Try out the Ubuntu1604 version in a virtual environment. Some configurations after installation are recorded as follows for later use.
Simple setup
- Root password setting
After the virtual machine is installed, the root user is not deprecated by default. You need to set a password for root before using it.
sudo passwd root
- Add
the terminal to the right-click After adding the terminal to the right-click, right-click in a directory to open the terminal, the current path of the terminal is this directory
sudo apt-get install nautilus-open-terminal
Common commands for software management
- apt cache
apt-cache search package
Search for packagesapt-cache show package
Get information about the package, such as description, size, version, etc.apt-cache depends package
Know which packages are dependent on using this packageapt-cache rdepends package
Check which packages the package depends on
- apt-get
sudo apt-get install package
Installation packagesudo apt-get install package --reinstall
reinstall the packagesudo apt-get -f install package
Repair installationsudo apt-get remove package
remove packagesudo apt-get remove package --purge
Remove packages, including configuration files, etc.sudo apt-get update
update sourcesudo apt-get upgrade
Update installed packagessudo apt-get dist-upgrade
Upgrading the systemsudo apt-get build-dep package
Install the relevant build environmentapt-get source package
Download the source code of the packagesudo apt-get clean && sudo apt-get autoclean
Clean up useless packagessudo apt-get check
Check for broken dependencies
- dpkg
dpkg -L <package>
View all files of a packagedpkg -l
View all packages installed by the system, followed by package, you can determine whether to installdpkg -S /usr/bin/sz
View the package to which the program belongs
Configure static IP
sudo vim /etc/network/interfaces
auto ens33
# iface ens33 inet dhcp
iface ens33 inet static
address 192.168.40.92
netmask 255.255.255.0
gateway 192.168.40.1
dns-nameserver 8.8.8.8
restart the networksudo /etc/init.d/networking restart
ssh service installation configuration
Ubuntu has an excellent desktop system. After installing Vmware Tools, desktop applications can meet most of our needs. Sometimes it is essential to use ssh to log in to the server for operation.
- Software needs to be updated for the first time
sudo apt-get update
- Install ssh server
sudo apt-get install openssh-server
- start ssh service
/etc/init.d/ssh start
- add startup
sed -i -e '/^exit 0$/i\etc/init.d/ssh start' /etc/rc.local
- The ssh service configuration file /etc/ssh/sshd_config can change the port monitored by ssh; Ubuntu does not allow root to log in remotely through a password by default, and the parameter PermitRootLogin can be changed to yes
- restart ssh service
/etc/init.d/ssh restart
NFS configuration
#sudo apt-get update '更新库
#sudo apt-get install nfs-kernel-server nfs-common portmap
#sudo vim /etc/exports
/home/suo/NFSroot *(rw,sync,no_root_squash,no_subtree_check)
#sudo /etc/init.d/nfs-kernel-server start
#sudo /etc/init.d/nfs-kernel-server stop
#sudo /etc/init.d/nfs-kernel-server restart
#sudo mount 172.29.6.97:/home/suo/NFSroot /home/suo/disk '客户端配置,挂载服务器的文件;将服务器172.29.6.97中的文件/home/suo/NFSroot 挂载到本地/home/suo/disk
#sudo umount /home/suo/disk '取消挂载
Install the 32bit library that Android depends on
apt-get install primus-libs-ia32
sudo apt-get install vim lrzsz
Continuing to update...
refer to: