Useful Unix & Linux system commands

 

chgrp    change group name (*=all files)

               >sudo chgrp nobody *

chmod  change file parameters
>sudo chmod 766 *

chmod  change file parameters
>sudo chmod 766 *

chname  change file owner name
>sudo chown nobody:nogroup *

^c           interrupt command line (^=control key)
>^c

cp           copy file or folder
>sudo cp * /path

dir          list file names
               >dir

df           show disk usage statistics
               >df

fdisk      get list of disks

               >sudo fdisk

kill          stop a running program by its pid number (see ps)
>kill 1234

list          read a text file
>list filename

ln            create link

               >sudo ln -s /path/to/target linkname

ls -l         show file list with descriptors
               >sudo ls -l

mkdir    make a new folder
               >sudo mkdir dirname

nano     open non-graphical text editor

               >sudo nano filename

rename change file name

               >sudo rename filename1 filename2

rm          delete file or folder

               >sudo rm *
               >sudo rm -r /folder/path

ps           list running programs’ pid numbers
               >sudo ps             

su           enter ‘super user’ (root) mode

               >su

sudo      perform command with root privilege

               >sudo command

unlink   delete a link
               >unlink linkname
uname  get system descriptors
               >sudo uname -a

xkill       kill an offending application

               >xkill (click on application window)