Java programmers are also half-operational and often come into contact with the Linux environment in their daily development. Developers in small companies are even doing full operations, so here are some common Linux commands.

Linux Common commands

Ls Display file or directory -l List file details l(list) -a List all files and directories in the current directory, including hidden a(all) mkdir Create directory -p Create directory. If there is no parent directory, P (parent) CD Switch directory touch create empty file vim/vi create/edit file insert Edit :q Exit :q! Forced exit :wq Save and exit esc Exit editing echo Create a file with content cat View the file content tar Package compression -c Create an compressed file -x Decompress the file -z gzip compressed file -j bzip2 Compressed file -v Display all processes -f Use the file name Cp Copy -r Recursive copy directory mv Move or rename rm Delete file -r recursive delete, Delete subdirectories and files -f Forcibly delete chmod Permission to change a file or directory kill a process find Search for a file in the file system wc Count the number of lines, words, and characters in the text grep Search for a character string in the text file rmdir Delete an empty directory tree PWD Displays the current directory. Log Creates a link file. Date Displays the system time. More/less Displays text file contents in pages. The default user identity is root su. Change the current user identity to another user. Stat Displays detailed information about the specified file. More detailed than ls who displays online login user whoami displays current operation user hostname displays hostname uname displays system information top dynamically displays information about the processes that consume the most resources ps displays instant process status -e displays all processes -f displays du in full format -s Displays all directory sizes. -h Displays directory sizes with units. Df Displays disk sizes with units. Df -h Displays disk information with units. Ifconfig Checking network status ping Checking network connectivity netstat Displaying network status -ano Checking whether a port is occupied -tlNP Searching for PID based on the port Man Checking Linux command help Clear clear the screen kill Reboot the process Restart the system shutdown -r Shutdown restart -h Shutdown Do not restart Now Shutdown immediatelyCopy the code

The above command is for reference only, welcome to leave a message to supplement.

Recommended reading


Resources: Ten stages of learning to become an architect!

Tutorials: The most powerful Spring Boot & Cloud tutorials ever

Tools: Recommended an online creation flow chart, mind mapping software

Scan and follow our wechat official account, reply “666” to get a set of Java concurrent programming HD video tutorial.