<> Common commands

<> View process and port number

View the process number of an application , For example, check tomcat Process number of (tomcat Start or not )
ps -ef | grep tomcat
ps -ef This means that all processes are displayed in long format ,grep tomcat Is to find and characters in all processes tomcat Related processes , And show it .

first root Represents the activation of the tomcat Users of , the second 32298 It's the process ID, Third It's occupation CPU Percentage of , The fourth is the percentage of memory used .

The other one on the top 21379 It means you use it grep This process of .

According to process number (PID) View the port number occupied :
netstat -anop | grep 32298

hear tomcat Occupied port number 80, There's more in it 8009 and 8005, This is all by default tomcat Some ports for listening , such as 8005, When implemented shutdown.sh close tomcat Time is connection 8005 Port execution “SHUTDOWN” command .

<> View port occupancy

lsof -i:80 see 80 The process information occupied by the port, etc

<> Firewall related

View firewall status systemctl status firewalld
Turn off the firewall systemctl stop firewalld
Turn on the firewall systemctl start firewalld

<> Find directory

Technology
©2020 ioDraw All rights reserved
Children programming children's learning route Android Development — Display food information according to customer budget Some views of a student on Hongmeng system LeetCode quick get start ① —— Array series ( Often asked in an interview , Suggested collection )error: (-215:Assertion failed) Solution Using function to realize the exchange of two numbers (C language ) realization LRU Cache(java edition ) Advanced programmer - Deep understanding of data structure SK Hynix World Premiere DDR5 Memory : The frequency goes up 5600MHz, Capacity up to 256GB Programmer's promotion 28 Sorting code of Guan 3