Linux Study Notes (1) knowledge points and common management tools during Linux Virtual Machine installation, linux Study Notes
1. VMware related knowledge (1) recommended VMware Configuration:
CPU |
Clock speed above 1 GHz |
Memory |
1 GB or above |
Hard Disk |
More than 8 GB of free partition Space |
(2) create a snapshot for VMware
A snapshot is used to save the existing status of the VM so that it can be returned to the same status in the future. Snapshot features: ① you can quickly start a virtual machine, and ② you can quickly recover when the virtual machine system crashes.
To create a snapshot, click the icon on the VMware toolbar and enter the snapshot name, as shown in:
To restore a snapshot, click the icon on the VMware toolbar, select the snapshot created in the pop-up dialog box, and click the "go to" button to open the snapshot.
(3) create a clone from VMware
"Clone" can generate an operating system exactly the same as the current computer, and occupy less resources than the two independent computers installed. Note: The cloned operating system is only the original image. Therefore, the cloned operating system cannot be used when the original host is deleted.
For specific operations, choose "Virtual Machine"> "manage"> "clone" on the menu bar and go to the "virtual machine cloning wizard"
Note: In subsequent operations, "Link clone" is generally used instead of "complete clone", because the former occupies less resources.
2 Linux Overview (1) Partition types in Linux
Partition type |
Features |
Primary Partition |
Up to four |
Extended partition |
① Only one ② A total of four primary and extended partitions ③ Data cannot be written and can only contain logical partitions |
Logical Partition |
The partition number always starts from 5, such as sda5 and sdb5. |
(2) Format
In Linux, formatting is also called logical formatting. It is based on the user-selected file systems, such as FAT16, FAT32, and NTFS) and EXT2, EXT3, EXT4 (these three belong to Linux), write specific data in a specific area of the disk. Specify a disk space in the partition for storing file allocation tables, directory tables, and other disk space for file management.
The main purpose of formatting is to write data to the file system. The two main tasks of writing data to the file system are as follows: ① dividing the hard disk into equal-size data blocks; ② establishing an iNode list for searching files.
(3) Hardware Device File Name
Hardware |
Device File Name |
IDE Hard Drive |
/Dev/hd [a-d] |
SCSI/SATA/USB hard drive |
/Dev/sd [a-p] |
Optical Drive |
/Dev/cdrow or/dev/sr0 |
Floppy Disk |
/Dev/fd [0-1] |
Printer (25-pin) |
/Dev/lp [0-2] |
Printer (USB) |
/Dev/usb/lp [0-15] |
Mouse |
/Dev/mouse |
(4) Partition file device name
The device name of the partition file is added with the partition number after the device file name of the hard disk. For example, IDE hard disk interface:/dev/hda1, SCSI and SATA hard disk interface:/dev/sda2. Note: currently, IDE and SCSI hard disk interfaces are rarely used. Currently, SATA is widely used because the latter is faster than the former two.
(5) Mounting
When installing the Linux virtual machine, VMware must partition: ① "/" (root partition) ② swap partition (swap partition size is twice the memory size, but cannot exceed 2 GB; can be used as a virtual partition, so there is no mount point)
Recommended partition:/boot (the allocated size is 200 MB, saving the data during system startup)
In linux, the file system is roughly as follows:
As you can see, subdirectories in the root directory can be stored in different disk spaces.
(6) Installation Log
①/Root/install. log: stores the software packages installed in the system and their version information.
②/Root/install. log. syslog: stores the event records left during installation.
③/Root/anaconda-ks.cfg: records the option information set during installation in the format of kickstart configuration file, can be used for automatic installation of multiple server systems (installation depends on this file)
3. Network Connection Mode in VMware
VMware virtual software provides three network connection modes: Bridging, NAT, and host-only, as shown in:
The following describes three modes.
① Bridge Mode (bridged)
In this mode, the vmwarevm uses a real Nic, which can not only communicate with its own real machine, but also with computers in the same network segment in the LAN. Therefore, you need to manually configure the IP address and subnet mask for the virtual machine, and the host must be in the same network segment. If you want to use VMware to create a virtual service area in the LAN to provide network services for LAN users, select the bridge mode.
② Network address translation mode (NAT)
In this mode, the virtual system uses the NAT Function to access the Internet through the network where the host is located. That is, the NAT mode can be used to access the Internet in virtual machines. In this mode, the TCP/IP configuration of the virtual machine system is provided by the DHCP server of the VMnet8 virtual network and cannot be modified manually. Therefore, the virtual machine cannot communicate with other real hosts in the LAN. The biggest advantage of this mode is that it is very easy for virtual machines to access the Internet without any other configuration. You only need the host machine to access the Internet normally.
③ Host-only)
In this mode, the vmwarevm communicates with the host machine through the false Nic VMnet1, but the virtual machine is isolated from the real network.
4. Linux management tools
Currently, there are many remote management tools in Linux. The following describes several tools used in the study.
(1) SecureCRT
SecureCRT can be used to log on to a UNIX or Linux server host in Windows. You only need to configure it. For detailed configuration and usage, refer to: 7.2 _ securecrt tutorial, SecureCRT configuration detailed graphic tutorial.
Here is a solution for garbled Chinese characters when SecureCRT is used when Linux is installed.
① Click "Options" on the menu bar and select the "Session Options" option.
② Select "Font" in "Appearance" in "Terminal", select a Chinese Font in the pop-up dialog box, and then select "_ GB2312" in "Character Set ", click "OK ".
③ Select the encoding method "UTF-8" in the "Character encoding" option and click "OK.
(2) Winscp
Winscp is a file copy tool that allows you to copy files between Windows and Linux. Easy to install and use. For more information, see WinSCP usage tutorial.
(3) Putty
It is also a powerful remote logon tool. For more information about downloading, installing, and using the tool, see the PuTTY Chinese site.