I. file Directory class 1. create directory: mkdir directory name 2. delete the empty directory: rmdir directory name 3. delete the subdirectory unconditionally: rm-rf directory name 4. change the current directory: cd directory name (go to the user's home directory: cd ~; Go to the upper-level Directory: cd-) 5. view your Directory: pwd6. view the current directory size: d
I. file directory class
1. create a directory: mkdir directory name
2. delete the empty directory: rmdir directory name
3. delete the subdirectory unconditionally: rm-rf directory name
4. change the current directory: cd directory name (go to the user's home directory: cd ~; Go to the upper-level Directory: cd -)
5. view your own directory: pwd
6. view the current directory size: du
7. display the directory file list: ls-l (-a: add an implicit directory)
Blue: Directory; Green: executable file; red: compressed file; light blue: linked file; gray: other files; red: Wrong link file
8. browse File: more file name. txt; less file name. txt
9. copy the file: The target file of the cp Source File (-r: contains directory)
10. find the file: (1) find (2) locate command name
11. link: (1) create a hard link: ln to link the source file (-d: create a directory link); (2) create a symbolic link: ln-s to link the source file
II. driver mounting
1. check hard disk usage: df-T-h
2. check the disk partition: fdisk-l
3. mount the hardware and software areas: mount-t/dev/fdx | hdax/mnt/directory name
Among them: modos -- FAT16; vfat -- FAT32; ntfs -- NTFS; optical drive -- iso9660
Supported Chinese names: mount-o iocharset = x/dev/hdax/mnt/directory name (where: x = cp936 or
Mount the optical drive: mount-t auto/dev/cdrom/mnt/cdrom
Mount the ISO File: mount-t iso9660-o loop xxx. iso/path
4. unmount: umount/mnt/directory name
Unmount all: umount-
5. create a file system: mkfs-t/dev/hdxx. Ftype: ext2, ext3, and swap
III. program installation
1. RPM Package installation: (1) install rpm-ivh somesoft. rpm
(2) reverse install rpm-e somefost. rpm
(3) query rpm-q somefost or rpm-qpi somefost. rpm (Where: p is not installed; information contained in I)
(4) query the location after installation: rpm-ql somefost. rpm
(5) upgrade and install: rpm-Uvh somesoft. rpm
(6) force installation: rpm-ivh -- nodeps somesoft. rpm or rpm-ivh -- nodeps -- force somesoft. rpm
2. install the source code package:
Read README
Basic usage (1) configuration: extract the directory./configure
(2) compile: extract the make
(3) installation: make install in the decompressed Directory
3. install src. rpm
The -- rebuild parameter must be added to the rpmbuild command. For example, rpmbuild -- rebuild ***. src. rpm. Then, find it under/usr/src /.
3. install the iso program in FC3: directory where system-config-packages -- isodir = iso is located
Install the iso program under RH: directory where redhat-config-packages -- isodir = iso is located
IV. compression and decompression
1.tar.gz class: (1) extract: tar-xvzf file .tar.gz((2)tar.gz to tar: gzip-d file .tar.gz (2) compression: gzip file to be compressed
2.tar uncompressed class: (1) unpack: tar-xvf file .tar; (2) package: tar-cvf file .tar file list
3.zip: (1) decompress: unzip file. zip-d dir; (2) compressed: zip zipfile list of files to be compressed
4.bz2: (1) decompress: bunzip2 file. bz2 or bzip2-d File. bz2; (2) compress: bzip2 file to be compressed
5. z class: (1) decompress: uncompress file. z; (2) compress: compress file
5. Process control
1. list the current process ID: ps-auxw
2. terminate processes: (1) terminate a single process: kill process ID
(2) terminate all processes of the program: Killall program name
(3) terminate the X-Window Program: xkill
3. View resource usage: (1) top (2) free (3) dmesg
4. view the environment variable value: env
5. restart: (1) reboot (2) Ctrl Alt Del (3) init 6
6. shutdown: (1) shutdown-h now (2) halt (3) init 0
7. switch the desktop: switchdesk gnome | KDE |...
6. program running
1. query command: whereis command name
2. run the X-Window program in the background: Program Name &
3. forcibly exit the X-Window Program: Ctrl Alt Backspace
4. View help:
(1) Concise help: command name -- help | less
(2) more help: man command name
(3) info command name
(4) help command name
5. view the system PATH: echo $ PATH
6. view the current shell stack: echo $ SHLVL
7. </>: input/output redirection. |: The Left input of the MPs queue is the right input of the MPs queue.
6. user accounts
1. add a user account: (1) User Name: adduser user account name
(2) set password: passwd user account name
2. delete a user account: userdel user account name
3. add a user group: groupadd user group name
4. delete a user group: groupdel user group name
5. temporarily terminate the user account: passwd-l user account name
6. restore the account to be terminated: passwd-u user account name
7. permission settings
(1) chmod-a | u | g | o |-| = r | w | x file/directory name
Where: a -- all users (all); u -- current user (user); g -- user group (group); o -- other users (other users)
-- Add permissions; --- delete permissions; = -- set permissions
File: r -- read-only permission (read); w -- write permission (write); x -- execute permission (execute)
Directory: r -- allow files and subdirectories in the column directory; w -- allow generation and deletion of files in the directory; x -- allow access to this directory
(2) chmod xxx file/directory name
Where: execute = 1; write = 2; read = 4
Value x: 0 -- no permission (commonly used); 1 -- can only be executed (uncommon); 2 -- can only be written (uncommon ); 3 -- write and execution only (uncommon); 4 -- Read-only (common); 5 -- Read-only and execution (common); 6 -- read and write (common); 7 -- read. write and execute
VII. vi editing
1. enter the command mode: (1) insert I; (2) Open 0; (3) modify c; (4) replace r; (5) replace s
2. after going through (1), enter the full screen editing mode.
3. command mode --> edit mode (a/I); edit mode --> command mode (Esc); command mode --> last line mode (:).
4. save w/w newfile
5.: q/q! Exit iv;: wq save and quit
VIII. network services
1. display network interface parameters: ifconfig
2. display system Email: mail
3. start/stop the web service: httpd-k start | stop | restart
4. View network conditions: (1) Online Status: ping xxx. xxx;
(2) display network status: netstat, where: options:-a = all sockets;-l = Contains network devices;-n = digital IP;
-O = Other information;-r = route table;-t = only columns of TCP sockets;-u = only columns of UDP sockets;-w = only columns of raw sockets;
-X = only columns of Unix Domain sockets