Among the many Linux terminal commands, we should introduce them by category. Here we will first talk about the file directory class, driver mounting class, program installation class, compression and decompression class, and process control class, all Linux terminal commands are frequently used here. It should be much easier to get familiar with these commands.
I. File directory
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
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 |...
Next we will introduce program running, user account, vi editing, network services, and other Linux terminal commands.
- Detailed analysis of hierarchical defense against Linux Server attacks
- Security Configuration for Linux system security improvement
- Detailed introduction to Linux USB flash drive boot and installation I) self-guided mode
- Summary of Linux shortcut keys
- Roles of seven Linux Command destruction