characteristics of Li Nux
2) support multithreading/multiuser
4 Superior memory and file management
sudo shutdown–h now turn off the machine
sudo shutdown–r now reboot
sudo shutdown–h nn minutes later shutdown
sudo shutdown–h 12:00 to 12:00 It's time to turn off the machine.
sudo reboot immediately reboot.
Enter the graphical interface (log off and back to the console)
Deactivate administrator user root
LS Displays the current directory and files below
Ls-l display files in a detailed manner
Ls-al Show hidden and in detail
Cd.. Return to Parent Directory
PWD Show the directory of course
CD-Back to the last directory
CD ~ or CD back to the current user's host directory
CD ~ User name back to the specified user's host directory
RmDir Delete Empty Directory
Touch to create an empty file
More a.txt display file content as pagination shift+page up prev
Less a.txt display the contents of a file as pagination page UP prev
Ls–help | More "|" For pipe commands, display content as pagination
grep "string"/home/a.txt query content in text
Man LS View the help information for the LS command is similar to Ls–help
Find/-name A.txt "/" represents the root directory (path), locating files A.txt
Fond–size +1000k to find files larger than 1000k
ls > A.txt Saves the results of the LS command execution to the A.txt file (Overrides)
LS >> a.txt will not overwrite (append to end of file)
ENV displays current operating system environment variables
Chsh–s new Shell (/BIN/CSH) Username (omitted to imply current user)
History 10 shows previously used commands
History!10 displays a command with a history number of 10
History!ls shows the last ls command used
Management of users and groups
Cat Etc/group View all Groups
CAT/ETC/PASSWD View All Users
Useradd Create a new user
USERADD–G Group name User name add to XXX Group
Userdel–r User name Delete user everything
Userdel user name Deletes the user, does not delete the user's folder
passwd user name creates password for user
passwd-d Username Delete User password can also log in
PASSWD-L Username Lock Account
Passwd-u User name Unlock Account
USERMOD–G Group name User name to another group
Usermod–d Directory name User name change user Login initial directory
Usermod-l new username old username name for user renamed
Usermod-l to lock user name lock User Login
Usermod–u unlock user name unlock user login
Usermod–u 501 username change user uid
Groupadd to create a new group
Ls–ahl file name View all groups of files
CHGRP Group name File name modify the group where the file/folder is located
chmod 777 Xiaohua Modify Permissions
Groupmod–n new username old username name Group renamed
GROUPMOD–G 501 Group name change Group GID
Groupdel Group name Delete Group
GPASSWD-A User name Group name to add user to group
ID User name Check user information
Permissions are divided into three types: R readable (4); W writable (2); x executable (1 indicates)
-File type-Represents a normal file, D represents a folder
The owner of the RW file has permission to the file, and RW says it can read and write
R permissions for the file in the group
R Permissions for users of other groups on this file
VI A.txt entered the editor and created a text called A.txt.
Enter the ESC key into command mode
Set Nonu Cancel line number
Enter a number and press ESC, and the cursor can jump to the line
Gcc–o myc1 aa.cpp Compilation
./myc1.out implementation
2 Multi-user status No NETWORK service
3 multi-user status with network service
4 system not used reserved to user
Modify Run Level:/etc/inittab Id:5:initdefault: The number of this line
. bin format Software Installation./test.bin (execution)
. deb format Software installation (install to specified directory) dpkg–i aa.deb–instdir= directory
Apt-get Install online software installation such as Apt-get install VSFTPD
Dpkg–r aa.deb Uninstall Software
Dpkg–l aa.deb Uninstall software (no retention of configuration files)
Mount/dev/sda1/mnt loading
Fdisk–l View disk Information
Df/boot See which partition the boot folder belongs to the disk
Zip aa.zip bb.txt Compressed file
Zip aa.zip bb.txt cc.jpg compress multiple files
Zip–r SS.XIP./bb/compressed Folder
Unzip–z Aa.zip View the contents of a compressed file
Unzip Aa.zip Decompression
1. ifconfig eth0 ***.***.***i Address p
Ifconfig eth0 Network ***.***.*** Subnet mask
Features: temporary entry into force
2. Vi/etc/sysconfig/network-scripts/ifcfg-eth0
/etc/rc.d/init.d/network restart
PS–A Displays all process information for the current terminal
Ps–u Display in user format
Ps–x Display background Run process
sudo kill process number terminate process
Kill-9 process number terminates process, higher strength
Killall process number can terminate child processes with related processes
Top monitor memory, process condition
Top–d 5 monitor memory, process condition, 5 seconds Refresh
Date View current date time
Cal 5 2000 View calendar for May 2000
Date Mmddhhmmccyy. The SS month is divided into years every year. seconds seconds
Netstat-an View current Network condition
sudo netstat-anp view current network status with the corresponding process number
Traceroute Tracking Routing
MySQL database backup and recovery
First go to the directory where MySQL is installed
Backup:./mysqldump–u root–proot (no spaces) dbname >/home/aa.sql
Recovery: Mysql–u Root–proot dbname
Modify/etc/default/locale
sudo vim/etc/default/locale1
Modify the default
Lang=zh_cn. UTF-8
Language=zh_cn:zh
For:
Lang= "en_US. UTF-8 "
Language= "En_us:en"