Ubuntu20.04 installation and optimization

table of Contents

1. Installation

2. System optimization

1. Set the root password

2. Change domestic sources 

3. Install VMware Tools

4. Install ssh

5. Allow root to connect to ssh

6. How to save read-only files

 


1. Installation

1. Download the iso image

Mirror download address

https://mirrors.huaweicloud.com/repository/ubuntu-releases/20.04.2.0/ubuntu-20.04.2.0-desktop-amd64.iso

2. Start the installation

Refer to this article, you can't go wrong if you follow it!

https://baijiahao.baidu.com/s?id=1670100505795119581&wfr=spider&for=pc

2. System optimization

1. Set the root password

       The newly installed system does not have a root password, so you need to set one for it, and it will be available after setting

sudo passwd root

After the modification, you can log in with root

2. Change domestic sources 

1. Configuration

After the system is installed, the default is the foreign source, downloading things is slow, we need to change to the domestic source, I am here to change the Ali source

Recommended graphical interface operation, refer to-" https://www.jb51.net/article/187442.htm

2. Test the update source apt-get update

3. Upgrade the software package on the system, otherwise apt-get will say that the software package cannot be found when downloading things

apt-get update          用来更新索引源,也就是同步软件包的索引信息,可以理解为更新系统软件的下载地址。
apt-get upgrade        用来升级系统上的软件包。

3. Install VMware Tools

At this time, the speed of installing things is very fast. If you don't change the source, you can wait slowly.

sudo apt upgrate    #若升级了就不用升级了
sudo apt install open-vm-tools-desktop -y
sudo reboot

Now you can paste and move things

4. Install ssh

1、安装openssh-server
sudo apt-get install openssh-server
2、开机自动启动ssh命令
sudo systemctl enable ssh
3、查看ssh是否启动,看到Active: active (running)即表示成功
sudo systemctl status ssh

After setting up according to the above, it can start automatically after booting

5. Allow root to connect to ssh

1. Configuration

Kali does not allow root users to make ssh connections by default.
Find these two places and modify them.

vim /etc/ssh/ssh_config

When saving at this time, it will say that the read-only file cannot be saved

6. How to save read-only files

Hold down shift+colon to enter read-only mode, enter the following enter

:w !sudo tee %

2. Restart ssh

service ssh restart

3. The shh login to root is successful

 

 

 

Guess you like

Origin blog.csdn.net/qq_44159028/article/details/115045388