99cloudtech...

99Cloudtech Blog

99cloudtech > Blog > Most Important Linux Commands
August 15, 2019 8.00 pm
980 79

Most important linux commands


- usermod -aG sudo customer
- usermod -aG wheel customer -- add to sudo
- service --status-all
- gzip –d <file name>
- w
- who
- users
- last
- finger
- netstat | grep http | wc –l
- netstat -ntu | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n
- grep -r 'coinhive' *
- shutdown –rh now
- killall mysqld
- kill -9 PID
- pidof mysqld
- kill -9 PID1 PID2 PID3
- pkill mysqld
- pgrep mysqld
- cat /etc/redhat-release
- ps aux|grep mysql
- screen –r
- screen –X –S <screen name> quit
- screen : inside session , click ctrl+A , then quit
- replace text in file : sed -i 's/VERSION/8.04/' file.txt : replace “VERSION” with “8.04”
- add text in file : sed -i 's/VERSION/a add this test' file.txt : append “”add this test” after “VERSION”
- Folder size : du -h –max-depth=1
- du -sh ./*/
- ncdu
- centos version : rpm --query centos-release



"On the other hand, we denounce with righteous indignation and dislike men who are so beguiled and demoralized by the charms of pleasure of the moment, so blinded by desire, that they cannot foresee the pain and trouble that are bound to ensue."