linux basic commands (under)

1, alias alias View alias

              Example: . 1, Alias 'RM = rm -rf / *': set the alias, rm command equals rm -rf / *

                      2, unalias rm: delete the alias rm

2, uname display output information (host details)     

                     uname -a: View all (system)

                     uname -r: Viewing the kernel information

3, hostname view the host name

                    hostname + name: Change the host name (currently in effect)

                    hostnamectl set-hostname + name: change the hostname (permanent)

                    echo "name"> / etc / hostname: Modify the host name (permanent)

4, history View history commands

                   history + figures: the command-line history display n

                   ! + Number: n-th line Repeat command

5, which view the directory path

6, wc statistics

            wc -l count the number of lines

            wc -w count the number of words

            wc -c statistical character, alphanumeric

7, who show who is logged on (refer to the current)

            whoami: Displays the user currently logged on

             w: shows who logged in (as long as the logged on will be recorded)

             who -p view the number of users currently logged on

8, ping command to test whether the network connectivity

             ping -t + ip or domain name: direct-connect

             ping -c + digital + ip or domain name: Connect How many times

             ping -w + time + ip or domain name: wait timeout (default unit is: seconds)

             ping -i + time + ip or domain: how long even a time interval (default units: seconds)

9, kill command to shut down the process

             kill + Process ID: Process

             kill -9 + process ID: Forced shutdown process

             kill -15 + Process ID: Process (not shut down immediately after the process is complete close)

10, du displays the directory and file size for Statistics    Note: ls -lh statistics is the file size du actual statistics are occupied by disk size. A minimum of 4k

            du -h displays the file size

            du -sh total size of the display

11, df -h to view a computer disk usage

12, free to view memory usage

             free -h to view memory usage

             free -m display in m

             free -s continuous refresh

13, data viewing system date and time

             On May% Y% m% d day% h h% M% S minutes seconds

              Data "the Y +% /% m /% D " view date

              data "+% F" View date

              data "+% T" time display

               data    -s   “年月日   时间 ”   修改时间

            

Guess you like

Origin www.cnblogs.com/clbk2019/p/11808267.html