Skip to content

Instantly share code, notes, and snippets.

@Subangkar
Last active December 25, 2021 09:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Subangkar/6ab73f6da3e440e35cd15902104a9d64 to your computer and use it in GitHub Desktop.
Save Subangkar/6ab73f6da3e440e35cd15902104a9d64 to your computer and use it in GitHub Desktop.
Common Linux Commands for remote server machine
# 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
# Distribution info
lsb_release -a
hostnamectl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment