Ubuntu Linux 安装初始化

2022-02-24  本文已影响0人  漂泊LFF

## Sources list update

sudo cp /etc/apt/sources.list /etc/apt/sources.list_bk

sudo echo "deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse" >> /etc/apt/sources.list

sudo echo "deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse" >> /etc/apt/sources.list

sudo echo "deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse" >> /etc/apt/sources.list

sudo echo "deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse" >> /etc/apt/sources.list

sudo echo "deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse" >> /etc/apt/sources.list

sudo echo "deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse" >> /etc/apt/sources.list

sudo echo "deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse" >> /etc/apt/sources.list

sudo echo "deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse" >> /etc/apt/sources.list

sudo echo "deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse" >> /etc/apt/sources.list

sudo echo "deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse" >> /etc/apt/sources.list

sudo apt update

# sudo echo y | apt-get upgrade

## Enable the ssh service

sudo echo "PermitRootLogin yes" >> /etc/ssh/sshd_config

sudo /etc/init.d/ssh restart

sudo systemctl enable ssh.service

## Set the Shanghai time

sudo timedatectl set-timezone Asia/Shanghai

## Gateway use the default ntp service. If you want to update the time follow the

## special server, you can use the ntpd service to update.

sudo timedatectl set-ntp on

## Install the vim

sudo apt install vim

sudo reboot

上一篇下一篇

猜你喜欢

热点阅读