Ubuntu 新装后常用设置

导航

  • [1 免密提权(根据情况设置)](#1 免密提权(根据情况设置))
  • [2 安装SSH 及 更新](#2 安装SSH 及 更新)
  • [3 更换国内源](#3 更换国内源)
  • [4 常用工具](#4 常用工具)

1 免密提权(根据情况设置)

bash 复制代码
sudo visudo

#
当前用户名 ALL=(ALL) NOPASSWD: ALL

2 安装SSH 及 更新

bash 复制代码
sudo apt update && sudo apt install -y openssh-server

sudo systemctl start ssh && sudo systemctl enable ssh && sudo apt upgrade -y && sudo apt autoremove -y

3 更换国内源

  • 命令行更换
bash 复制代码
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak

#echo重写
sudo tee /etc/apt/sources.list << EOF
deb http://mirrors.aliyun.com/ubuntu/ noble main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ noble-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ noble-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ noble-backports main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ noble-proposed main restricted universe multiverse
EOF

#更新
sudo apt update && sudo apt upgrade -y
  • 图形化设置
    选择 软件和更新


    选择其他

    1、选择最佳服务器:系统测速自动选择最佳的。
    2、手动选择 mirrors.aliyun.com 阿里云源。

4 常用工具

  • build-essential:包含编译工具 (gcc, make 等),很多软件依赖它。
  • git:版本控制必备。
  • htop:一个更好看的交互式进程查看器,比系统自带的好用。
  • ncdu:磁盘空间分析神器,可以快速找出是哪个文件夹占用了大量空间。
  • curl、wget、unzip
bash 复制代码
sudo apt install -y build-essential git htop ncdu curl wget unzip 
相关推荐
Android系统攻城狮7 小时前
Linux Gstreamer深度解析之gst_audio_ring_buffer_delay调用流程与实战(七十二)
linux·运维·服务器·gstreamer音视频·音视频进阶
快乐的韭菜根根8 小时前
ubuntu 安装slurm并配置
linux·运维·ubuntu
U-Mail邮件系统8 小时前
自建邮箱服务器有哪些软件?三款主流邮件服务器软件推荐
运维·服务器
倒头就睡的小比特9 小时前
Linux基础指令3
linux·服务器
天远数科10 小时前
零信任架构实战:基于天远贷前风险报告构建自动化消金信贷风控与多头共债排查网关
运维·人工智能·架构·自动化
梦帮科技10 小时前
Kali Linux Scapy 畸形报文构造学——深度解剖非法 TCP Flags 与反常序列号
linux·爬虫·神经网络·算法·数学建模·系统架构·模拟退火算法
半杯咖啡半行码11 小时前
Linux 驱动开发入门:内核模块编程基础
linux·服务器·网络
别动我齐刘海11 小时前
Linux 系统调试学习2
linux·运维·c++·人工智能·学习·机器学习·机器人
龙虾电话11 小时前
语音机器人打断不进去:VAD 双阈值迟滞里一个共用的 bool,和它引发的连锁误判
linux
honsor11 小时前
机房IP化改造首选:以太网温湿度传感器,PoE供电+Modbus TCP一网搞定
linux·运维·服务器