Install ubuntu on virtual machine

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.

Enable ssh service##

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

Check the IP and use xshell to connect##

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".

Modify source##

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

Modify the source as Alibaba source##

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.

Update package##

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

Install ubuntu on virtual machine
Install R package on UBUNTU virtual machine
Virtual machine VirtualBox-5.1 install ubuntu16.0.1
Install Python virtual environment on Ubuntu 18.04
Install OS X 10.15 virtual machine based on Ubuntu platform
Install Ubuntu on VMware virtual machine and install using UltraISO
install vscode on ubuntu18
Install Redis on Ubuntu
Install R4 on ubuntu20
Install nvtop on Ubuntu 18.04
Install postgresql-10 on Ubuntu 18.04
Install docker on Ubuntu
Install Docker on ubuntu18.04
Install nodejs10 on Ubuntu16
Install mysql on Ubuntu 14.04
Install Django on ubuntu
Install Pytorch+CUDA on Ubuntu 16.04
Install Python3 on Ubuntu 14.04
Install rJava on Ubuntu18
Install Ubuntu 18.04 in the virtual machine VMware
Install VM virtual machine on Mac, equipped with Ubuntu system
Install JDK10+ on Ubuntu
Install Python3 on Ubuntu 16.04
Install KDE on Ubuntu16.04.2
Install Docker on Ubuntu18
Install Python3.7 on Ubuntu
Install flashplayer on Ubuntu
Docker practice (1): install Docker on Ubuntu 16.04
Install OpenSSL 1.0.2 on Ubuntu Server 14.04
Install QQ robot on Ubuntu 16.04
Install Python 3.7 on Ubuntu 18.04 LTS
Ubuntu14.04 creates Genymotion virtual machine
Install Android Studio on Ubuntu
Install scrapy framework on ubuntu
Install Mysql offline on Ubuntu
Install Oracle Java8 on Ubuntu
VMwareWorkstation10.0 install CentOS7.0 virtual machine
Install Odoo 11 stack on Ubuntu 16.04
Install Go locale on Ubuntu16
Install common software on Ubuntu 16.04
Install non-portable QQ on ubuntu
Install Docker on Ubuntu 18.04 offline
Install KVM on CentOS 7 and create a virtual machine
How to install Ruby on Ubuntu 20.04
How to install Java on Ubuntu 20.04
How to install VirtualBox on Ubuntu 20.04
How to install Elasticsearch on Ubuntu 20.04
How to install Protobuf 3 on Ubuntu
Install Tenda u12 driver on Ubuntu
How to install Nginx on Ubuntu 20.04
How to install Apache on Ubuntu 20.04
How to install Git on Ubuntu 20.04
How to install Node.js on Ubuntu 16.04
How to install MySQL on Ubuntu 20.04
Install and configure MySQL on Ubuntu
Install Chef server workstation on Ubuntu 18.04
How to install Vagrant on Ubuntu 20.04
How to install Bacula-Web on Ubuntu 14.04
Install botan2 encryption library on ubuntu
How to install PostgreSQL on Ubuntu 16.04
How to install Git on Ubuntu 20.04