ls
- directory listingls -al
- Formatted listing with hidden filescd dir
- change directory to dircd
- change to homepwd
- show current directorymkdir dir
- create directory dirrm file
- delete filerm -r dir
- delete directory dirrm -f file
- force remove filerm -rf dir
- remove directory dircp file1 file2
- copy file1 to file2mv file1 file2
- rename file1 to file2ln -s file link
- create symbolic link 'link' to filetouch file
- create or update filecat > file
- place standard input into file(ctrl + z
to exit)more file
- output the contents of the fileless file
- output the contents of the filehead file
- output first 10 lines of filetail file
- output last 10 lines of filetail -f file
- output contents of file as it grows
ssh user@host
- connect to host as userssh -p port user@host
- connect using port pssh -D port user@host
- connect and use bind port
./configure
make
make install
ping host
- ping host 'host'whois domain
- get whois for domaindig domain
- get DNS for domaindig -x host
- reserve lookup hostwget file
- download filewget -c file
- continue stopped downloadwget -r url
- recursively download files from url
date
- show current date/timecal
- show this month's calendaruptime
- show uptimew
- display who is onlinewhoami
- who are you logged in asuname
- a - show kernel configurecat /proc/cpuinfo
- cpu infocat /proc/meminfo
- memory informationman command
- show manual for commanddf
- show disk usagedu
- show directory space usage
grep pattern files
- search for pattern in filesgrep -r pattern dir
- search recursively for pattern in dircommand I grep pattern
- search for for pattern in the output of commandlocate file
- find all instances of file
ps
- display currently active processesps aux
- ps with a lot of detailkill pid
- kill process with pid 'pid'killall proc
- kill all processes named procbg
- lists stopped/background jobs, resume stopped job in the backgroundfg
- bring most recent job to foregroundfg n
- brings job n to foreground
chmod octal file
- change permisssion of file
4 - read(r)
2 - write(w)
1 - execute(x)
order :- owner/group/world
eg:
chmod 777
- rwx for everyone
chmod 755
- rw for owner, rx for group/world
-
tar cf file.tar files
- tar files into file.tar -
tar xf file.tar
- untar into current directory -
tar tf file.tar
- show contents of archive tar flags: c - create archive j - bzip2 compression t - tables of contents k - do not overrite x - extract T - files from file f - specifies filename w - ask for confirmation z - use zip/gzip v - verbose -
gzip file
- compress file and rename to file.gzip -
gzip -d file.gz
- decompress file.gz
ctrl+c
- halts current commandctrl+z
- stops current commandfg
- resume stopped command in foregroundbg
- resume stopped command in backgroundctrl+d
- log out of current sessionctrl+w
- erases one word in current linesctrl+r
- reverse lookup of previous commands