Ubuntu development environment to build

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 packageSearch for packages
    • apt-cache show packageGet information about the package, such as description, size, version, etc.
    • apt-cache depends packageKnow which packages are dependent on using this package
    • apt-cache rdepends packageCheck which packages the package depends on
  • apt-get
    • sudo apt-get install packageInstallation package
    • sudo apt-get install package --reinstallreinstall the package
    • sudo apt-get -f install packageRepair installation
    • sudo apt-get remove packageremove package
    • sudo apt-get remove package --purgeRemove packages, including configuration files, etc.
    • sudo apt-get updateupdate source
    • sudo apt-get upgradeUpdate installed packages
    • sudo apt-get dist-upgradeUpgrading the system
    • sudo apt-get build-dep packageInstall the relevant build environment
    • apt-get source packageDownload the source code of the package
    • sudo apt-get clean && sudo apt-get autocleanClean up useless packages
    • sudo apt-get checkCheck for broken dependencies
  • dpkg
    • dpkg -L <package>View all files of a package
    • dpkg -lView all packages installed by the system, followed by package, you can determine whether to install
    • dpkg -S /usr/bin/szView 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 timesudo apt-get update
  • Install ssh serversudo apt-get install openssh-server
  • start ssh service/etc/init.d/ssh start
  • add startupsed -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:

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325656385&siteId=291194637