Common Commands

ls : list directories

cd /* : change directory to *

rm file : deletes file

cp : copy

mv : moves

ln -s file link : creates a sym link link to file

touch file : create or update file

head file : output of the first 10 lines of file

ps : display your currently active processes

top : display all running processes

kill pid : kill process id pid

bg : lists stopped or background jobs

fg : brings the most recent job to foreground

fg n : brings job n to the foreground

whereis app : shows possible locations of app

uname -a : shows kernel information

chmod XXX file : change the permissions of file

  • 4 - read (‘r’)

  • 2 - write (‘w’)

  • 1 - execute (‘x’)

EX:

chmod 777 - read,write,execute for all

chmod 755 - rwx for owner, rx for group and all

cat /proc/cpuinfo : shows cpu information

cat /proc/meminfo : show memory information

Last updated

Was this helpful?