This is a bash cheatsheet I created when I got my hands on server remote control, process handling etc.

Find out the models of the GPUs

$ lspci | grep -i --color 'vga\|3d\|2d'

Get GPUs status

$ nvidia-smi

htop:

$ htop

Processes handling

Check the processes running

$ ps aux | grep X (example: ps aux | grep apt)

Kill a process using its PID

$ kill -9 PID

Remote control

Copy from local to ssh, from ssh to local

$ scp (-r) chemin/fichier login@serveur:chemin
$ scp (-r) login@serveur:chemin/file chemin/

Atom Remote, open distant folder on Atom

$ ssh -R 52698:localhost:52698 rafaelcartenet@143.248.39.104

Download content from the given url

$ wget URL

History of all different ssh commands used

$ history | grep ssh

Call command ID

$ !idcommand

Unzip

Unzip tar files

$ tar -xvf file.tar

Unzip tar.gz files

$ tar zxvf file.tar.gz

Other

Number of files in a repository/file

$ ls -1 | wc -l
$ wc -l <filename>

Updated: