Linux brief introduction

Linux Is a free and open source operating system , There are many different Linux edition , But they all use it Linux kernel .Linux Can be installed in various computer hardware devices , Like cell phones , tablet PC , Router , Desktop computer

Linux introduce

Linux Appears in 1991 year , Students from the University of Helsinki, Finland Linus Torvalds Developed together with many fans who joined later

Linux characteristic

Multiuser , Multitask , Rich network functions , Reliable system security , Good portability , Standard compatibility , Good user interface , Excellent speed performance
Open Source

CentOS

* main stream : current Linux Operating system is mainly used in production environment , Mainstream enterprise level Linux The system is still RedHat perhaps CentOS
* Free Admission :RedHat and CentOS There is little difference , be based on Red Hat Linux Free to use source code provided by the enterprise CentOS It's a level Linux Release
* Easy to update :CentOS Unique yum Command support online upgrade , System can be updated in real time , Not like RedHat That would cost money to buy support services !
Linux directory structure

* bin (binaries) Store binary executable
* sbin (super user binaries) Store binary executable , only root To access
* etc (etcetera) Store system profile
* usr (unix shared resources) System resources for sharing
* home Root directory for user files
* root Superuser directory
* dev (devices) Used to store equipment files
* lib (library) Store shared libraries and kernel modules needed for program running in file system
* mnt (mount) Installation point for system administrator to install temporary file system
* boot Store various files used for system boot
* tmp (temporary) Used to store various temporary documents
* var (variable) Used to store files that need to change data at runtime
Linux Common commands

Command format : command - option parameter
as :ls -la /usr ls: Show list of files and directories (list)
Common parameters :
-l (long) -a (all) Pay attention to hiding files , Special catalogue . and .. -t (time)
Linux Classification of commands

Internal command : belong to Shell Part of the parser
cd Switch directories (change directory) pwd Show current working directory (print working directory) help help
External command : Independent of Shell File programs other than parsers
ls Show list of files and directories (list) mkdir Create directory (make directoriy) cp Copying files or directories (copy)
View help documents
Internal command :help + command (help cd) External command :man + command (man ls)
Common commands for operating files or directories
pwd Show current working directory (print working directory) touch Create an empty file mkdir Create directory (make directoriy)
-p If the parent directory does not exist, Mr. Cheng will be the parent directory (parents) cp Copying files or directories (copy) -r
Recursive processing , Copy files in the specified directory together with subdirectories (recursive) mv Move files or directories , Rename file or directory (move) rm Delete file (remove)-r
Delete all files in the directory at the same time (recursive)-f Force file or directory deletion (force) rmdir remove empty directories (remove directoriy)
cat Show text file content (catenate) more,less Page by page display of text file content head,tail View the beginning or end of the text haed-n 5 a.
log see a.log Before the document 5 That's ok tail -F b.log Circular reading (follow)
Common commands
wc Count lines of text , Number of words , Number of characters (word count) -m Count text characters -w Count text words -l Count lines of text find
Find the specified file in the file system find /etc/ -name "aaa" grep Finds the specified string in the specified text file ln Establish linked file (link) -s
Make a symbolic connection to the source file , Not hardwired (symbolic) top Displays the most resource consuming processes in the current system ps Show instantaneous process status -e /-A Show all processes , environment variable
-f Full format -a Show all processes for all users ( Including other users ) -u Display processes in the order of user name and start time -x Show progress without control terminal kill Kill a process
kill -9 pid df Show file system disk space usage du Show specified files ( catalog ) Total disk space used -h File size to K,M,G
Display in units (human-readable)-s Display only the sum of file sizes (summarize) free Displays current memory and swap space usage netstat
Display network status information -a Show all connection and listening ports -t (tcp) Show only tcp Related options -u (udp) Show only udp Related options -n
Reject alias , All the numbers that can be displayed are converted into numbers .-p Display the name of the program that established the relevant link ifconfig Network configuration of network card ping Test network connectivity
Backup compression command
gzip compress ( decompression ) File or directory , The suffix of the compressed file is gz bzip2 compress ( decompression ) File or directory , The suffix of the compressed file is bz2 tar file , Directory printing ( solution ) package
gzip command
Command format :gzip [ option ] compress ( decompression ) File name of -d Extract the compressed file (decompress) -l Show the size of the compressed file , Size of uncompressed files , Compression ratio (list)
-v Display filename and compression ratio (verbose) -num Use the specified number num Adjust the compression speed ,-1 or --fast Represents the fastest compression method ( Low compression ratio ),-9
or --best Represents the slowest compression method ( High compression ratio ). The system default value is 6
bzip2 command
Command format :bzip2 [-cdz] Document name -c Output the data generated by the compression process to the screen -d Decompressed parameters (decompress) -
z Compressed parameters (compress)-num Use the specified number num Adjust the compression speed ,-1 or --fast Represents the fastest compression method ( Low compression ratio ),-9
or --best Represents the slowest compression method ( High compression ratio ). The system default value is 6
tar command
-c Parameter instruction for creating a compressed file (create) -x Instructions for unpacking a compressed file (extract) -z Need to use gzip compress -j Need to use
bzip2 compress -v Show files during compression (verbose) -f Use file name , stay f You need to pick up the file name immediately after that (file)
Shut down / Restart command
shutdown System shutdown -r Restart immediately after shutdown -h Do not restart after shutdown halt Power off after shutdown shutdown -h reboot Restart
shutdown -r
study Linux Good habits

* Good at checking man page(manual) Etc
* Make good use of it Tab key
*
Master some shortcut keys
ctrl + c( Stop the current process ) ctrl + r( View command history ) ctrl + l( Clear screen , And clear Commands work the same )

Technology
©2019-2020 Toolsou All rights reserved,
( Essence )2020 year 8 month 9 day C# Basic knowledge reflex ELementUI select Multi select drop-down box to get all properties of the selected item ajax get Request Chinese parameter garbled solution Novices play hiss HI3520D Development board ( One , upgrade )[RK3399][Android7.1] Learning notes DRM Driver development ( introduce )Fiddler Simulate request sending and modifying response data ( Essence )2020 year 6 month 26 day C# Class library Log help class ( Essence )2020 year 6 month 26 day C# Class library GUID Help class python obtain excel A column or row of data ( Essence )2020 year 6 month 26 day C# Class library File read and write operation help class