Useful Commands/System Management: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
== OS Management == | |||
123 | |||
== TODO == | |||
{| class="wikitable" | {| class="wikitable" | ||
! 情境 || 指令 | ! 情境 || 指令 | ||
Revision as of 07:19, 27 January 2022
OS Management
123
TODO
| 情境 | 指令 |
|---|---|
| List process |
ps -axo pid,command
ps -axo pid,command | awk 'match($2, /^ssh/) { print $0; }'
ps -axo pid,command | awk 'match($2, /^login/) { print $0; }'
ps -axo pid,command | awk 'match($2, /^-?bash/) { print $0; }'
|
| List process tree |
pstree 713
pstree $(ps -axo pid,command | awk 'match($2, /^login/) { print $1 }')
|
| CPU & Memory |
# Linux
cat /proc/cpuinfo
cat /proc/meminfo
free
sudo dmidecode --type 17,19,20
|
| Locale |
locale # current locale
locale -a # available locales
sudo locale-gen # rebuild locales
|
| Run a command one minute later |
echo "ls -l > `tty`" | at now + 1 minute
|