Over the past one weeks, I have been learning about Linux by watching aminglinux videos online, and have a preliminary understanding and exposure to Linux.
What is 1.Unix, Linux, GUN, and GPL?
Linux common distributions SlackWare, Suse, Debian, Android, etc. (iOS belongs to Unix)
Linux can do server, run website, personal PC operating system, mobile phone system, router, Internet of things, etc.
2. Create a virtual machine
Install vmware or VirtualBox, download the image file Centos-isos, create a virtual machine, do not change the display resolution, change will cause a black screen failure
3. Installing the CentOS System
Install a CentOS system on a virtual machine, create a custom layout, divided into 3 zones,/boot,/, Swap,swap for memory swapping
4. Configure the IP address
Instruction: Ifconfig-a See how many network cards and network card IP is, (plus a can see all network cards, not only to view the network card is turned on) IO is a loopback address, communication between the internal.
Network connectivity with bridging and NAT two ways
Instruction: Dhclient automatic acquisition of IP, the next time to enter Dhclient before the Killall dhclient instructions to execute first
directive: Vi/etc/sysconfig/network-scripts/ifcfg-eth0 (vi is the command, followed by the address) to view the NIC configuration file. Press I enter the compilation mode, onboot=no refers to the boot network card does not start, should be changed to YES,BOOTPROTO=DHCP refers to through the DHCP service to obtain the IP, should be changed to static IP line add ipaddr= based on the IP range in the virtual network adapter write
netmask=255.255.255.0
Gateway= according to the virtual network adapter write, the last one 1 does not change to 2
Dns1= the host, how much to hit
Press ESC to exit the compilation mode, enter: Wq to save and exit
: Q exit: q! Force exit
Directive: Service Network restart restart networking service
Instruction: Ping url to enter the URL by CTRLC stop
Instruction: Ifdown eth0 stop the NIC 0
Instruction: ifup eth0 switch on the NIC 0
5. Remote Connection tool use
Installing the remote Controller putty
Play a name on the IP that corresponds to the virtual machine save and then open
In Putty, right-click to copy and paste.
6. Key Verification
Open Puttygen Click Generate Set Public key (generate) and private key (own settings) to save
directive: mkdir Create directory Add. For hidden files
directive: chmod Change file permissions
Shut down two firewalls
Configure the client to load the private key and log on to the virtual machine with the private key to the server
7. Operating level
Instruction RunLevel Viewing RunLevel
Altogether 7 levels
0 Turn off the machine
1 Single-User mode
2 Multi-User but no NFS
3 + Users
4 retention Useless
5 graphical interface
6 restart
Init 0 shutdown init 6 restart
Reboot, Shutdown-r now restart shutdown-h now shutdown
Among them, in the link of learning to configure IP appeared more problems, took a lot of time, but at most through the inspection also solved the problem, very deep impression.
The first chapter of Linux Learning