1 Introduction and installation of Linux
Linux is a set of free-to-use and freely-propagated Unix-like operating systems. Linux and iOS, as well as Mac OS X, are all UNIX-centric design ideas.
Linux is the main system: redhat and Cent OS.
-unix directive:
PWD Displays the current directory or file
mkdir Create directory
rmdir Delete empty directory
Touch Create empty file
RM Delete file -R Delete all files simultaneously-f Force Delete
LS lists the current file and directory list ls-la common parameters:-L (Long),-a (all),-t (time)
MV Move or rename file or directory
CP copy file or directory
PS display process
Open Open a file \ folder
Clear screen
who displays the current user
CD switch directory
~ Back to current directory
Cat display text file contents
More,less page display text file contents
Head, Tail viewing the beginning and ending of text
WC statistics text lines, words, characters
Find specific files in file system
grep in a text file lookup string
Ln establishing a link file
Top displays the most resource-intensive processes of the current system
PS display transient process status
kill kills a process
DF displays the file system disk, space usage
du shows the total number of disk space used by the specified file
free displays current memory and swap space usage
Netstat Display network status information
Ifconfig network configuration details
Ping test network connectivity
Backup compression command:
Gzip Compress (unzip) file or directory, suffix gz;
bzip2 Compress (unzip) file or directory, suffix is bz2;
Tar unpack the file or directory;
-C to create a compressed file
-X to unlock a compressed file
-Z-If you need gzip compression
-j If you need bzip2 compression
-V compression process show file
-f use filename
Remember: tar -XZVF f.tar.gz-c demo/(decompression required command)
Shutdown system shutdown
-R Restart now -H do not restart
Halt power off
Reboot restart
History view command Historical
Ctrl + C stop Current process
ctrl+l clear Screen
Take advantage of the TAB key.
Directory Structure of Linux:
Root Path/
Bin Sbin etc usr home root dev lib mnt boot tmp var ...
(These are directory structures)
Bin (binaries) stores binary execution files;
Sbin (super User binaries) stores the binary execution file, only root access;
etc (etcetera) to store system configuration files, such as the configuration files required by the mouse user
USR (Unix shared resources) shares system resources;
Home store user files directory;
Root Super User directory;
Dev (Devices) stores device files, such as terminal
Lib (library) stores the shared libraries and kernel modules that are required to run programs in the file system;
MNT (Mount) system administrator installs the temporary file system installation point;
Boot holds files used for system boot;
TMP (temporary) holds temporary files;
var (variable) stores the change data file.
Introduction to Linux