Linux Command Encyclopedia

Source: Internet
Author: User
Tags clear screen gz file locale zip extension disk usage domain name registration inode usage

Linux Command Encyclopedia

Directory

Linux Command Encyclopedia ... 1

Directory... 1

I. Installation and landing commands ... 1

Second, graphical interface related commands ... 2

Iii. Information Display Command ... 3

Iv. File processing commands ... 7

Five, System Management related commands ... 10

VI. Network operation-related commands ... 12

Vii. system security-related commands ... 13

Viii. Other orders ... 14

First, installation and landing commands
1. Enter the graphical interface
StartX

2. Enter the graphical interface
Init 5

3. Enter the character interface
Init 3

4. Login
Login

5. Shut down the machine
Poweroff
-P Turn off the power when shutting down the machine
-N does not synchronize data when shutting down the machine
-W do not shut down the operation, just to record this operation in the log
-D do not check the information recorded in the log file
-F do not call shutdown

6, Shutdown restart
Shutdown
Command format:
shutdown [Options] time [INFO]
Time-is necessary parameter, must add, can use now, also can use +5
Information--Information to the user when the computer is shut down

-t This parameter should be followed by a number, such as 5, indicating that the shutdown signal after 5 seconds to start shutdown
-K do not do a real shutdown, just notify all users.
-R Restart the computer
-H power off after shutdown
-F skips fsck at reboot (disk checker)
-F Restart, ignore Fsck program (same as-f)
-C cancels the shutdown action that was already performed
Cases:
#shutdown-K now just kid
#shutdown-H now system shut

7. Shut down the machine
Halt
Option Same as Poweroff

8. Restart the computer

Www.87717.com


Reboot

9. Mount mount file system, umount unmount file system
Mounting discs
#mount-T Iso9660/dev/cdrom/mnt/cdrom
or #mount/mnt/cdrom.
Unmount Disc
#umount/mnt/cdrom
Exit Disc
#eject
Send to Disc
#eject-T

Mount Floppy #mount/mnt/floppy
Unmount floppy disk #umount/mnt/floppy

Mount the local FAT32 partition and display the Chinese after mounting
#mount-T Vfat-o Iocharset=cp936/dev/hda1/mnt/win
Uninstalling #/umount/mnt/win

mount a USB drive or a removable hard drive
#mount-O Iocharset=utf8/dev/sda1/mnt/usb
Uninstall #umount/mnt/usb
If the locale is not utf8, but GB18030, use the following command to Mount
#mount-O Iocharset=gb2312/dev/sda1/mnt/usb


mount a disc image to the local/mnt/cdrom directory, using the following command
#mount-T Iso9660-o loop/tmp/cd.iso/mnt/cdrom

10. command to install operating system under character interface
Linux text

11. Choose different methods to install the operating system commands
Linux Askmethod

Second, graphical interface related commands
1. System settings
Setup

2. Service startup settings
Ntsysv

3. Login Settings
Gdmsetup
Gdmconfig

4. Network Settings
Networkconfig

Thizconfig

5. Volume Control
Gnome-volume-control

6. KDE Control Center
Kcontrol

7. KDE Setup Wizard
Kpersonalizer

8. Network Detection command
Xmtr

Third, the Information display command

1. Show the time required to execute the specific instruction and the information of system resources.
Time

2. Display or set the date and time of the system
Date
If you do not start with a plus, it means to set the time, and the time format is MMDDHHMM[[CC]YY][.SS], where mm is the month, DD is the day, HH is the hour, MM is minutes, CC is the first two digits of the year, YY is the year after two digits, SS is the number of seconds
#date 081112552006.35

3. Display Calendar
Aa.
#cal-M
#cal-S
#cal 2006
#cal 08 2006

4, uptime
Provide user information below, no additional parameters required
The time now
The time the system is running until now
Number of users connected
System load for the last minute, five minutes, and 15 minutes
Parameter:-V Displays version information
#uptime

5. Last
Displays information about the system since it was powered on or from the beginning of the month
#last

6, DMESG
Display System-initiated information

7, Uname
Display System Information
-M display Hardware model
-N Display host name
-R Display Kernel version
-s display operating system type
-V Displays the operating system version
-A Show All information

8. Id
Display real and valid UID and GID
#id Display ID information for the current user

9, hostname
Displays or sets the host name of the system
-a displays the alias of the host
-d Display DNS domain name
-F reads the host name from the specified file
-I displays the IP address of the host

10. Who or W
Show online Login User
-Q Displays all login names and login numbers
#w display information about the current user in the system
#w User Username only displays information for the specified user

11, WhoAmI
Show the user's own identity

12. Whois
Query domain name registration and IP address related information
#whois www.sina.com.cn
Tip: If you want to register a domain name, you can use the Whois tool to check if someone is registered.

13, Whatis
View the explanation of the command
#whatis ls

14, Whereis
Displays the system command and the directory where the document is located
#whereis ls

15, which


Displays the directory where the system commands are located
#which ls

16. Stat
Displays information about the specified file (with node content)
#stat-f/View entire file system situation

17. Free
Show current memory and swap space usage
-B in bytes
-M in megabytes

18. Du
Displays the total amount of disk space used by the specified file or directory
-a displays statistics on all files (including subdirectories)
-B output result one byte bytes units
-C only calculates the total usage of the catalog
-H in M 1024kb=1m
-H in M 1000kb=1m
-S displays only the sum of the directory usage space

19, DF
Display the usage of file system disk space
-H with 1024kb=1m calculation
-H with 1000kb=1m calculation
-t specifies the type of partition to display
-I displays the inode usage of the partition

20. WC
Counts the number of bytes, words, and lines in the specified file, and displays the result output
-C Output byte count
-L Output line break statistics
-L OUTPUT the longest line length
-W Output word Count

21, LS
displaying catalog files
-A show all files (including hidden files)
-l display with long format
-F Append file categories as symbols
-R Displays the contents of the directory in a tree-like structure


-D View Directory properties
-I displays the inode number of each file
-m all items are separated by commas and fill the entire line
-H will list file size and user-friendly format output
-t lists file names in the order in which they were last modified
--color Color Display file

22. Cat
Display text file contents
-B Displays the number of rows when displaying the contents of a file
-N Display file contents including blank lines
-S merges multiple empty rows into one empty row output

23. Tac
Reverses the display of the file contents, followed by the lines shown above
Option ditto

24. Head
Display the first lines of a text file
-N (number of rows) displays the last specified line of the file
-B (bytes) Displays the contents of the last byte of the file
-Q does not output the contents of the file header
-V Output File header contents

25, tail
Display the following lines of a text file
Option ditto

26, more or less
Pagination display of text file contents
-S compresses multiple empty rows into a blank line
-p Clear screen after the display
+ lines are displayed directly starting with the given number of rows
-numbers specify how many rows to display each time

27. Cut
Displays the text from the beginning of each line from NUM1 to num2
# Cat Example


Test2
This is Test1
# cut-c0-6 Example # # Print start counting the first 6 characters
Test2
This I

28. Pwd
Show Current working directory

29. Locale
Show current locale

30, Fc-list
List system fonts

31. Jobs
View current terminal, background process under current shell

32, PS
View processes in the system
#ps aux
#ps-elf

33, Pstree
Display all trips in a tree-shaped view

34. Top
View real-time processes in the system

35. Set
viewing system Variables

36. Export
View environment variables

37, man
View command Help information

38. Info
View command Help information

39. Help
View command Help information


Iv. File processing commands

1. File
Show file types

2, mkdir
Create a Directory
-P Create a directory (build a multilevel directory)
-m specify permissions for the directory

3. grep
Finds the specified string in the specified text file

4, DD
Converting and outputting data
#dd If=/dev/hda of=/dev/hdb HDD to copy

5. Find
Find a file or directory
-name a search based on the specified file name
Example: #find.-name "*.C" (Lists all files with the current directory and its subdirectories with the file name extension C)

-type finding files of the specified type
Type files are:
L Link
Catalog D
F Common Files
B-Block device files
C-Character device files
s socket (socket file)
P Piping (pipe) file
Example: #find ~-type D

-size N [BC] Find N-value-size files, default units are bytes
B=bit
c=kb
Cases:
#find ~-size 1500b
#find ~-size +1500b
Find files larger than 1.5M in size

#find ~-size-1500b
Find files less than 1.5M in size

-user < username > Find files belonging to a specified user
#find/-user Test

-group < user group name > Find files belonging to a specified user group
#find/-group Test

-newer < file name > Find files that are newer than files
#find/-NEWER/HOME/HTTPD

-cmin +n Find files that have been modified within the last N minutes (-) or other (+)
#find ~-cmin +20

-ctime +n Find files that have been modified in the past N days (-) or other than (+)
#find ~-ctime +20

-atime +n Find files that have been read in the past n days (-) or outside (+)
#find ~-atime +20

-amin +n Find files that have been read within (-) or outside of the last n minutes (+)


#find ~-amin +20

-links N Find n number of links to a file
#find/home-links [2-5]

6, MV
Move a file or directory, rename a file or directory
-I appears prompt
-V Show Progress
-F Force Move
-U moves only if the source file is newer than the destination file

7. diff
Compare and display the section of file differences

8, Comm
Compare file Contents

9, Ln
Create a link between files
-s option for symbolic links
-F Force Link creation
-I appears prompt
-V Display Operation information

10, RM
Delete a file or directory
-R Recursive Delete
-F Force Delete
-V Displays information when deleted
-I will be prompted to confirm when deleting

11, RmDir
Delete Empty Directory
-P Delete the directory in turn
-V Displays information when deleted

12. CP
Copy a file or directory
-R recursively replicates the contents of the entire directory
-F Forced replication
The permission value of the directory is retained after-p copy finishes
-I prompt with the same name when copying
-V Show Progress
-L Create a hard link
-U copies only when the destination file is older than the source file

13. cd
Switch directories
#cd back to the user's home directory
#cd-Go back to the user's home directory
#cd ~ Go back to the user's host directory
#cd: Go to the top level directory
#cd/Switch to the root directory
#cd. Switch to current directory

14. Tar
-F This option must be used to indicate the use of an archive file
-V Show Progress
-C Create a new tar file
-Z Call gzip or gunzip program
-j Call bzip2 or BUNZIP2 program
-T displays the contents of the TAR package file
-X Unzip the tar file
-R Append one or more files to the existing tar package
-U replaces files in the package if the file is newer than the package file
-K Keep the original file while unpacking the package file
-c Specifies the destination directory for unpacking
-A appends other packaged files to a packaged file
-M divides a package into multiple packages, but must be used with the-l parameter (the process of subcontracting implementation is more cumbersome)
--get extracting a file
--remove-files to delete files after packaging
-T for Test decompression, no decompression to the current directory

Format:
tar [options] generate a packaged file name for the source file to be packaged

15, Compress
Compress command, generate. z Files

16, Uncompress
Unzip a file with a. z Extension

17. zip
Compress files or directories

18, unzip
Unzip a file with a. zip extension

19. Gzip
Compression command (does not support compression of the directory), generating. gz files

20, Gunzip or Zcat
Unzip the. gz file

21, Bzip2
Compress command, generate the. bz2 file

22, BUNZIP2
Unzip command

23. Touch
Change the time stamp of a file or create an empty file

24, unlink
Remove soft Links

25, locate
Search the system for files that contain strings

26, LDD
List shared libraries related to the file


V. System administration RELATED commands

1. Clear
Clear interface

2, Konsole
Open Command Terminal

3, Gnome-terminal
Open Command Terminal

4. Fdisk
modifying disk Partitions
M help
L Print a known partition
D Delete a partition
n Create a new partition
P Print the current partition table
W writes the new partition table to disk and exits
T change the system ID of a partition
Q Discard Save and exit
Example: #fdisk/dev/hda
#fdisk-L

5, MKFS
Format Disk Utility
After typing mkfs, press the TAB key two times to show many formatting tools

6. fsck
Detect and Repair file system in single-user mode
For example:
#fsck-j/dev/hda1
Note: It is not recommended to manually fsck and the system will automatically call

7, quota
Display and limit the user's disk usage

8, Quotacheck
-A checks all non-network file systems according to/etc/mtab (with the-a parameter, you can no longer manually specify which partition to check)
-V Show procedures and results
-U check partition with Usrquota parameter
-G check partition with Grpquota parameter
-C CREATE Database Aquota.usr and Aquota.group
-M forces all partitions to be checked for read-write mode
-R checks all partitions except the root partition
#quotacheck-AVUGC

9, Quotaon
Start quota
-A open all disk quotas
-V Show Output results
-u Specifies a user-based disk quota
-g Specifies to open group-based disk quotas
-P Print Current status

10, Quotaoff
Close Quota
Option ditto

11, Edquota
Configure Limits
-U user Name
-G Group Name
-T set wide time-limited room

12, Repquota
View all quotas

13, at
Executes a specific command at a specified time

14, ATQ
Querying for tasks to be performed

15, ATRM
Delete a task to perform

16, Crontab
Set up Scheduled Tasks

17. LP
Print files

18, Useradd
New Account

19, Usermod
Modify account Settings

20, Userdel
Delete Account

21, Groupadd
Set up a group

22, Groupmod
Change the group identifier or name

23, Groupdel
Delete a group

24. Kill
To signal or terminate a program

25. Nice
Execute the program with a changed priority

26, Renice
To adjust the priority of the executing program

27, Wget
Download the file from the specified URL

28, Md5sum
Calculate and verify the software MD5 code

29, MESG
Control write access to the currently used terminal

30, Wall
Broadcast information

31. Write
Transferring information to other users

32, LPQ
List the status of the printer queue

33, LPRM
Delete a job that is printing

34. Sleep
Time suspended

35, CHFN
Change the information displayed by the finger

36, Chsh
Shell used to change user login system


VI. Network Operation related commands

1, Ifconfig

Www.87717.com


setting or displaying a network interface

2, Ifup
Enable network interface

3, Ifdown
Turn off the network interface

4. Ping
A package that transmits Icmpecho to check online status

5, Netstat
Querying the current state of a network

6. Route
Display and set up routes

7, Traceroute
Track the routers that go online

8. mtr
is a command that has both a ping function and a traceroute function.

8, xmtr
is a command that executes under X windows

9, Tcpdump
Displays the online status of TCP on the network

10. Telnet
Remote Online Program

11. FTP
File transfer

12, Rlogin
Remote Login Host

13. rcp
Remotely copying files or directories

14. SSH
Remote Encrypted online

15, Finger
Remote query for user information on host

16. Mail
Send and receive mail

17. Host
Querying the domain name used by the host

18, Nslookup
Query the network name and address of the corresponding


Vii. system security-related commands

1, passwd
Modify User Password

2, Su
Switch and replace the user's identity

3. sudo
Executes the program with the specified user rights

4, Umask
Set permissions masking for new files

5, Chgrp
Change the group to which a file or directory belongs

6, chmod
Change permissions for a file or directory

7, Chown
Change the owner or group of a file or directory

8, Chattr
Change file properties

9, Lsattr
List the file attributes on ext2

10, pswho


Viii. Other Orders
1. BC
Calculator

2, Xmms
Player

3, Xine
Player

Linux Command Encyclopedia

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.