First, Linux system installation
System installation can be divided into two categories: physical machine installed Linux, virtual machines (common virtual machine software has two kinds: VMware and VirtualBox) install Linux.
Installation process There are many tutorials on the internet, here is not to repeat.
Ii. Common Commands
1. Files and directories
LS Lists directory contents
-l list File details L (list)
-a lists all files and directories in the current directory, including hidden files ("'.") Files that begin with, such as. bashrc)
-R is listed together with the contents of subdirectories
Which view the path of the specified command, for example: which LS (/usr/bin/ls)
mkdir creating the specified directory
-P creates a directory that, if no parent directory, is created together with the parent directory
CD Switch Directory
Touch if the file exists, update the access and modification time of each file to the current time; Create an empty file if it does not exist
Echo creates a file with content.
Cat views the contents of the file and outputs the content to the terminal by default
CP Copy files or directories
MV Move or rename
RM Delete File
-R Recursive Delete, can delete subdirectories and files
-F Force Delete
Find searches a file system for a file
WC statistics Text line number, word count, number of characters
-C (-bytes/-chars) shows only bytes number
-L (-lines) displays only the number of columns
-W (-words) displays only the number of words
Grep finds a string in a text file
RmDir Delete Empty Directory
-R with Rm-r
-F with Rm-f
Tree structure display directory (manual installation, ubuntu:apt-y install tree;centos:yum-y install tree)
PWD Displays the current directory
LN creates a linked file
-S Create soft connection
DF View Disk Usage
2. Shutdown/restart
Shutdown-t (number of seconds)
-R shutdown Restart
-H shutdown does not restart
Now turn the machine off.
Halt shut down the machine
Reboot restart
3. Compress Package Management
Tar: Packaging compression
-C Archive File
-X Compressed file
-Z gzip Compressed file
-j bzip2 Compressed Files
-V shows the compression or decompression process V (view)
-F Use file name
RAR: compression: rar a-r Dir.rar dir
Decompression: Unrar x Dir.rar
Zip: Pack: zip-r dir.zip dir
Unpacking: Unzip Dir.zip
Code Sea Supplements: Common Linux commands (i)