The company's computer is windows. Because the unique features of linux are usually used. Such as swoole and so on. So, I installed ubuntu in a virtual machine.
Well, not much nonsense, I use automatic installation, and the login account password has been set before installation. After the installation is complete, the ssh service is not installed.
First execute the following command to install openssh
sudo apt install openssh-server -y
Start the service and set the boot to start
sudo systemctl start ssh
sudo systemctl enable ssh
View ip
ip addr
Check your network card information and find that my IP is 192.168.110.128.
Because it is not easy to use the terminal inside the virtual machine directly, and it is impossible to copy and paste or something, I use an external terminal program. I am using xshell here.
Create a new session attribute, enter the host ip (which we just obtained), and enter the user name and password in the user authentication.
Then click the link at the bottom. A pop-up box will appear, select "Interface and save".
The first thing after entering is to modify the apt source.
Before modifying the source, we first install the VIM editor:
sudo apt install vim -y
After the installation is complete, we need to edit the apt source file to remove the cd source.
sudo vi /etc/apt/sources.list
Comment out the configuration on line 5:
# deb cdrom:[Ubuntu-Server 17.10 _Artful Aardvark_ - Release amd64(20171017.1)]/ artful main restricted
This is the content of the source I copied from Alibaba Cloud's help file.
deb http://mirrors.aliyun.com/ubuntu/ quantal main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ quantal-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ quantal-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ quantal-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ quantal-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ quantal main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ quantal-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ quantal-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ quantal-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ quantal-backports main restricted universe multiverse
First we need to modify the content.
We view version information:
baoguoxiao@ubuntu:~$ sudo lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 17.10
Release:17.10
Codename: artful
You can see that the value of codename is artful
We can replace all the above quantal with artful, the replacement is completed as follows:
deb http://mirrors.aliyun.com/ubuntu/ artful main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ artful-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ artful-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ artful-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ artful-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ artful main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ artful-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ artful-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ artful-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ artful-backports main restricted universe multiverse
Then add the replaced content to the beginning of /etc/apt/sources.list.
In this way, :x can be saved.
it's actually really easy. First update the source:
sudo apt update
The following will be output in the last line of the output message:
46 packages can be upgraded. Run 'apt list --upgradable' to see them.
This means I have 46 packages to update. Then execute the following command to update it:
sudo apt upgrade -y
Well, the initial installation environment has been set up.
Recommended Posts