I. Introduction to the History of Linux
Linux is an operating system, is a type of short version of the release, its main core is kernel, that is, the kernel, is the founder of Linus Torvalds in 1991 in Finland, the kernel can be divided into major version number, minor version number, and revision number (the minor version is odd for the development version , even the most common distribution vendors for stable versions of Linux are Redaht,centos,ubuntu, SuSE, and so on. Most companies choose Redhat or CentOS
Second, VMware 9+centos installation
1.before you set up VMware, you need to be aware of several places:
memory set to 1G
do not specify a mirror path when creating a new virtual machine
NIC set bridging mode
Monitor set resolution is 800*600
2, installation of CentOS, you need to note:
Choose Chinese Simplified, out graphics
Custom partition Layouts
Minimal Installation
3. Configure IP
1.dhclient can get IP automatically
2, manually set the IP, need to edit the configuration file/etc/sysconfig/network-scripts/ifcfg-eth0
need to modify: Onboot = yes
added: dns1=8.8.8.8
Third, Xshell/putty remote settings
1. Installing Xshell/putty Software
2. Generate key, secure login
A, double-click PUTTYGEN.exe to generate a key pair, save the private key to a safe place, copy the public key
Puttygen>generate (SSH-2 RSA 1024-character Fumi key) > Set key Passphrase>save Privatekeys
b, create/root/.ssh directory on Linux, change permissions 700--chmod. SSH
C, write the public key content to/root/.ssh/authorized_keys---chmod. Ssh/authorized_keys
D, temporarily shut down the firewall selinux setenfoce 0
Permanent active shutdown Firewall: Vim etc/selibux/config >> settings selinux=disabled
Firewall rule empty: iptables-f
Save rule prevents rebuild rule:/etc/init.d/iptables Save
E, set the Putty client to use the key sign-in point to the right of SSH > Auth then click "Browse" on the right to select the private key we saved just now
Iv. process PS of Linux commands
There are 5 states of processes on Linux:
1. Running (running or waiting in the running queue)
2. Interrupt (dormant, blocked, waiting for a condition to form or receive a signal)
3. Non-interruptible (receive signal does not wake up and not run, process must wait until interrupt occurs)
4. Zombie (The process has been terminated, but the process descriptor exists until the parent process calls WAIT4 () after the system call is released)
5. Stop (process received Sigstop, SIGSTP, Sigtin, Sigtou signal after stop running run)
1) PS A shows all the programs under the current terminal, including other users ' programs.
2) ps-a Show All Programs.
3) PS C lists the program, displays the actual instruction name of each program, and does not include the path, parameter or the indication of the resident service.
4) Ps-e The effect of this parameter is the same as specifying the "A" parameter.
5) When listing the program, PS e displays the environment variables used by each program.
6) PS F Displays the tree structure with ASCII characters, expressing the relationship between the programs.
7) ps-h shows the tree structure, indicating the relationship between the programs.
8) Ps-n shows all the programs except the program under the PS Command Terminal.
9) PS s uses the program signal format to display the program status.
PS S when listing programs, including interrupted sub-program data.
Ps-t < terminal number > Specify the terminal number and list the status of the program belonging to the terminal.
PS U Displays the status of the program in a user-oriented format.
PS x Displays all programs and does not differentiate by terminal.
Ps-l longer, more detailed information about the PID
# Ps-la |more
F S UID PID PPID C PRI NI ADDR SZ Wchan TTY time CMD
4 S 0 1 0 0 76 0-1193 109952? 00:00:03 Init
1 S 0 2 1 0-40--0 Migrat? 00:00:03 migration/0
1 S 0 3 1 0 94 19-0 Ksofti? 00:00:00 ksoftirqd/0
1 S 0 4 1 0-40--0 Migrat? 00:00:02 MIGRATION/1
1 S 0 5 1 0 94 19-0 Ksofti? 00:00:00 KSOFTIRQD/1
1 S 0 6 1 0-40--0 Migrat? 00:00:02 MIGRATION/2
1 S 0 7 1 0 94 19-0 Ksofti? 00:00:00 KSOFTIRQD/2
The meaning of the relevant information:
F process sign (flag),4 indicates user is a super user
S State (STAT), the meaning of each stat
The ID of the PID process
C percentage of CPU usage resources
PRI priority (First Class),
NI Nice value,
ADDR core function, which indicates that the process is in the stored part, if it is the process of the movement, it is generally "-"
The size of the deposit that is used by SZ
Wchan If the previous process is running, if "-" means that it is running.
End position of TTY landing
Time spent on the CPU
Commands executed by CMD
Install VMware + CENTOS/IP configuration/xshell remote Control