[Linux Shell] CentOS Some use shell management commands Collection (1) Continuous update

Check the system version rpm -q centos-release

[Linux shell] Collection of some useful shell management commands for CentOS (1) Continuous update

View the kernel
uname -r

View the top 10 processes currently occupying the largest memory
ps aux |sort -nrk 4 |head -n 10

View the top 10 processes currently occupying cpu
ps aux |sork -nrk 3 | head -n 10

top command

Enter capital P in top command mode, and the results will be sorted in descending order of CPU usage. Enter a capital M, and the results are sorted in descending order of memory usage. (Note: The uppercase P can be entered in the capslock state, or press Shift+p)

【Linux shell】CentOS some easy-to-use shell management commands collection (1) Continuous update

nc command

1 Check if the port can be accessed
nc -z -v 47.107.44.58 22

[Linux shell] Collection of some easy-to-use shell management commands for CentOS (1) Continuous update

Check if the system is trying to log in.
lastb

[Linux shell] Collection of some easy-to-use shell management commands for CentOS (1) Continue Update

Check the system's recent successful login system record
last

< img alt="[Linux shell] Collection of some useful shell management commands for CentOS (1) Continuous update" src="/wp-content/uploads/images/os/centos/1626797814366.png" >

Leave a Comment

Your email address will not be published.