Skip to content

Instantly share code, notes, and snippets.

@chetandhembre
Last active August 29, 2015 14:06
Show Gist options
  • Save chetandhembre/cdeff7f870401eabce66 to your computer and use it in GitHub Desktop.
Save chetandhembre/cdeff7f870401eabce66 to your computer and use it in GitHub Desktop.
useful Linux commnad
# find process holding port
sudo netstat -lpn |grep :80
# run nginx command
sudo LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH /opt/nginx/sbin/nginx
#reload nginx
sudo LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH /opt/nginx/sbin/nginx -s reload
#get all nginx process
ps fax | grep nginx
#get architecture of machine like number of cpu and all
lscpu
#get free memory of machine
free
#get io operation install iotop using following command
sudo apt-get install iotop
#get all ip from network (wlan or lan)
sudo arp -a
#login to another user over ssh
sudo su -s /bin/bash jenkins
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment