Linux common commands Miscellany

1. [root @ thousand ~] # cat / proc / version // Viewing the kernel

2. [root @ thousand ~] # lsb_release -a // check the version number

3. [root @ thousand ~] # ifconfig // View card information

4. [root @ thousand ~] # setup // Open the card configuration desktop

5. [root @ thousand ~] # ifup // Get DHCP IP

6. [root @ thousand ~] # mkdir / data // create a / data file directory

7. [root @ thousand ~] # touch stu {1..10000} // create ten thousand files

8. [root @ Thousand ~] # echo 'Iam Studying Linux'> test1.txt 
 // If the file exists will clear the contents written to '' contents, if there is no will to create a file
[root @ thousand ~] # cat test1. TXT
Iam Studying Linux

 9. [root @ thousand ~] # echo 'hello' >> test.txt // This will be added behind the file (Append) '' content, if there is no will to create a file
[root @ thousand ~] #echo '111 2222 3333' >> test.txt

10. [root @ thousand ~] # yum install tree -y // when using the tree does not exist, the installation tree

11. [root @ thousand ~] # mkdir -p / oldboy / test // Create a directory to continuous -p

12.[root@thousand ~]# alias       //查看系统现有别名
alias cp='cp -i'
alias l.='ls -d .* --color=auto'
alias ll='ls -l --color=auto'
alias ls='ls --color=auto'
alias mv='mv -i'
alias rm='rm -i'
alias which='alias | /usr/bin/which --tty-only --read-alias --show-dot --show-tilde'
13.[root@thousand ~]# unalias cp   删除cp别名

14.data -s "Time" // Modified

15.data // View Time

16. [root @ thousand ~] # service network restart // Network Service Restart

17. [root @ thousand ~] #ps -ef | grep ssh // see the process of command

18.[root@thousand ~]# netstat -lntup |grep ssh

19. [root @ thousand ~] # /etc/init.d/iptables stop // turn off the firewall

20. [root @ thousand ~] # netstat -lntup | grep 22 // view the server listening port 22

21. [root @ thousand ~] # /etc/init.d/sshd restart // ssh restarting method

22. [root @ thousand ~] # rz after // Enter can select the files you want to transfer, and can not pass directory

23.init numbers (0-6) // switching mode

24.runlevel // view the current system run level

25.shutdown -h now (halt, init 0) // now be shut down

26.reboot (shutdown -r now, int 6) // restart the server

27. [root @ thousand ~] # /etc/init.d/iptables stop // temporarily turn off the firewall

28. [root @ thousand ~] # /etc/init.d/iptables status // display firewall status

29. [root @ thousand ~] # chkconfig iptables off // firewall has been turned off

30. [root @ thousand ~] # cat / etc / sysconfig / i18n // Check coding

31. # export TMOUT = 10 // more than ten seconds automatically exit

32. # history // view the command history! Digital: You can view the first few command history

33. # history -c // clear all history command

34. [root @ thousand ~] # history // delete Article n history -dn

35.[root@thousand ~]# export HISTFILESIZE=415

36. [root @ thousand ~] # export HISTSIZE = 5 // Number command line history

37. [root @ thousand ~] # export HISTFILESIZE = 5 // command line corresponding to the number of records

38. [root @ oldboy ~] # cat / etc / issue // Version information

39. [root @ thousand ~] #> / etc / issue // redirection number is greater than, and emptying the contents of the file

40. [root @ thousand ~] # echo $ HISTSIZE // display the number of history commands

Word 41. # aspell -c file name // Check the file writing error correction, etc.
 

Guess you like

Origin blog.csdn.net/qq_24036403/article/details/93308304