There are many ways to configure the network environment, I am here to talk about a common use profile settings
First, you have to first of all your installed Linux system, run the virtual machine, enter the terminal
Second, Amway about Linux common commands
1, open the file, save (using the following vi command mode) closes the file
vi filename // Open the file filename
: w // save the file
: w vpser.net // save to vpser.net file
: q // exit the editor, if the file has been modified, please use the following command
:! q // exit the editor device without saving
: wq // exit the editor and save the file
2, insert text or lines (vi after using the command mode, execute the following command to enter the insert mode, press the ESC key to exit insert mode)
a // add text to the right of the current cursor position
i // add text to the left of the cursor position
A // add text to the end of the current line
I // add the text (non-blank lines at the beginning of the current row first)
O // new row above the current row
o // create a new row below the current row
R // replacing (overwriting) the current text cursor position and the plurality of rear
J // merge the cursor line and the next line behavior ( still in command mode)
Second, configure the network environment for nat mode
In the configuration settings of virtual machines in
Third, open the Virtual Network Editor, view their Linux network segment which segment it
1, a virtual machine edit ➡ ➡ Virtual Network Editor
2, select the virtual machine, enter the NAT settings, remember your subnet IP, subnet mask, gateway IP, use the back
Fourth, configure ifcig-eth0
1, into the terminal, vi / etc / sysconfig / network-scripts / ifcfg-eth0 edit ifcig-eth0
vi is a file for editing, here at the White Amway Linux common commands
一、打开文件、保存、关闭文件(vi命令模式下使用)
vi filename //打开filename文件
:w //保存文件
:w vpser.net //保存至vpser.net文件
:q //退出编辑器,如果文件已修改请使用下面的命令
:q! //退出编辑器,且不保存
:wq //退出编辑器,且保存文件
二、插入文本或行(vi命令模式下使用,执行下面命令后将进入插入模式,按ESC键可退出插入模式)
a //在当前光标位置的右边添加文本
i //在当前光标位置的左边添加文本
A //在当前行的末尾位置添加文本
I //在当前行的开始处添加文本(非空字符的行首)
O //在当前行的上面新建一行
o //在当前行的下面新建一行
R //替换(覆盖)当前光标位置及后面的若干文本
J //合并光标所在行及下一行为一行(依然在命令模式)