Common Linux/Unix Commands

 

Command/Syntax


Response


 


apropos keyword


Locate commands by keyword lookup

alias command-string target


Alias commands

cat [options] file

 

Concatenate a file/files

cd [directory]

 

Change directory

chgrp [options] group file

 

Change group of file

chmod [options] file

 

Change file permissions

chown [options] owner file

 

Change file owner

clear


Clear screen

compress [options] file

 

Compress file to file.Z

date [options]

 

Display current date and time

diff [options] file1 file2

 

Compare two files and display the differences

df [options] [resources]

 

Disk device summary

du [options] [dir or file]

 

filesystem space usage

echo [text string]

 

Echo string to standard output

emacs [options] file

 

Text editor

exit


Exit from shell

file [options] file

 

Classify file types

find dir [options] [action]

 

Find files

grep [options] string file


Search for string in file

gzip [option] file


Compress file to file.gz

gunzip [options] file


Uncompress a file.gz file

kill [options] pid


Send signal to process

ln [options] source target


Link source file to target

logout


End session

lpr [options] file


Print file

ls [options] dir/file/files


List directory or files

man [options] command


Show manual pages

mkdir [options] dir


Make directory

more [options] file


Page through an ascii file

mv [options] file1 file2


Move file1 to file2

passwd [options]


Change user password

ps [options]


Show process status

pwd


Print working directory

rm [options] file


Remove file

rmdir [options] dir


Remove directory

setenv VAR “text setting”


Set environmental variable

source file


Read/execute shell setting/commands from file

ssh user@ipaddress


Secure shell- remote logins

scp file user@ipaddress:file


Secure file transferes

scp user@ipaddress:file file



tar [options] files/dir


File archiver

uncompress file.Z


Uncompress file.Z to file

wc [option] file


Count lines, words, & chars

which command


Show path to command

who


Show who's logged on