Last active
December 25, 2021 09:04
-
-
Save Subangkar/6ab73f6da3e440e35cd15902104a9d64 to your computer and use it in GitHub Desktop.
Common Linux Commands for remote server machine
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Internet speed Test Check with speedtest-cli | |
curl -s https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py | python - | |
# Show free RAM | |
free -h | |
vmstat | |
# Show CPU config | |
lscpu | |
# Show free disk space | |
df -h | |
# Live CPU/RAM usage | |
top | |
# Top RAM usage | |
ps aux --sort -rss | head -5 | |
# Show logged in users | |
who -H | |
w | |
last | head | |
# Run wget in background | |
wget -bqc http://path-to-url/linux.iso | |
nohup wget http://domain.com/dvd.iso & | |
## disown bash command | |
wget -qc http://path-to-url/linux.iso & | |
## Verify wget ## | |
ps aux | grep wget | |
ls -lh CentOS-7.0-1406-x86_64-DVD.iso | |
## [Optional] Stop wget by killing by PID number | |
kill PID-HERE | |
ps aux | grep wget | |
# run script detached from terminal | |
./script.sh >> out.log & disown | |
# show all processes associated with current terminal | |
ps T | |
# show all processes associated with current user | |
ps -u ${USER} | |
ps -p 1 -p $$ -wo user,pid,%cpu,%mem,vsz,rss,tty,stat,lstart,cmd -u ${USER} | |
ps axo stat,euid,ruid,tty,tpgid,sess,pgrp,ppid,pid,pcpu,comm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Distribution info | |
lsb_release -a | |
hostnamectl |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment