Common Linux commands and some common problems
Common linux commands1. View Linux Version 1.1. View linux kernel version uname-r or uname-a1.2. view the linux kernel version cat/proc/version1.3. view the Linux host name hostname 2. Start or close the FTP service. vsftp start 3 view linux hard disk size df-lh4 view linux memory size free5 view CPU count ls/proc/acpi/processor view CPU information cat/proc/cpuinfo6 view the current directory absolute path pwd7 terminal disable Firewall service iptables stop ------------------------------------------------- linux system vi editor vi test // edit the content of the test file Esc key +: + q! // Introduces vi interface 8 how to solve the problem of garbled characters in linux System (1) check whether the current user command whoami is not root. Switch to the root user first and run the following command: su-root // the user and the shell environment both become the root identity (su is the switch user Switching user) su root // only switches the root identity, however, the shell environment is a normal user's shell (2) editing the file environment variable vi/ect/vimrc configured by vi
Esc key + wq! // Save the content and release the command "how to view the hard disk size in vi 9" df-h 10 real-time monitoring of Linux system command top ". It can monitor the CPU, memory, swap space, and disk IO of Linux system in real time.. If you want to stop real-time monitoring, you can use the Ctrl + C key combination to terminate.