: This article mainly introduces common commands at work. For more information about PHP tutorials, see. Ps aux | grep svn check whether SVN is started
Netstat-tln check current port status
Ps-A | grep nginx check whether nginx is started
Iptables-I INPUT-p tcp -- dport 80-j ACCEPT add firewall Port
/Etc/init. d/iptables status view firewall Port
Ps-aux | grep mysql viewing process
Change the password!
#/Etc/init. d/mysql stop
# Mysqld_safe -- user = mysql -- skip-grant-tables -- skip-networking &
# Mysql-u root mysql
Mysql> UPDATE user SET Password = PASSWORD ('newpassword') where USER = 'root ';
Mysql> flush privileges;
Mysql> quit
#/Etc/init. d/mysqld restart
# Mysql-u root-p
Enter password:
Mysql>
Done!
Killall mysqld kills all processes
View hard disk usage
Df-h
View memory usage
Free-m
Memory usage measurement
Measure how much memory a process occupies. linux provides us with a very convenient method. The/proc directory provides us with all the information, in fact, the top tool also obtains the corresponding information here.
/Proc/meminfo memory usage information of the machine
/Proc/pid/maps pid is the process number and displays the virtual address occupied by the current process.
Memory occupied by/proc/pid/statm process
The above describes common commands at work, including some content, and hope to be helpful to friends who are interested in PHP tutorials.