UNIX Commands :-)
1) cal:- Displays a calendar
Syntax:- cal [options] [ month ] [year]
2) clear :- It clears the terminal screen.
Syntax :- clear
3) pwd :- Displays path from root to current directory
Syntax :- pwd [options]
4) cd:- It is used to change the directory.
Syntax :- cd [directory]
5) ls:- Lists the contents of a directory
Syntax :- ls [options]
6) exit :- It is used to terminate a program, shell or log you out of a network normally.
Syntax :- exit
7) echo :- It prints the given input string to standard output.
Syntax :- echo string
8) who :- who command can list the names of users currently logged in, their
terminal, the time they have been logged in, and the name of the host from which
they have logged in.
Syntax :- who [options] [file]
9) whoami:- Print effective userid
Syntax :- whoami
10) mkdir:- This command is used to create a new directory
Syntax :- mkdir [options] directory
11) rmdir:- It is used to delete/remove a directory and its subdirectories.
Syntax :- rmdir [options..] Directory
12) bc:- bc command is used for command line calculator. It is similar to basic
calculator. By using which we can do basic mathematical calculations.
Syntax :- bc [options]
13) uname:- It is used to print system information.
Syntax :- uname [options]
14) tty:- Print the file name of the terminal connected to standard input.
Syntax :- tty
15) stty:- Change and print terminal line settings.
Syntax :- sty
16) cat:- It is used to create, display and concatenate file contents.
Syntax : - cat [options] [FILE]...
17) cp:- cp command copy files from one location to another. If the destination is an
existing file, then the file is overwritten; if the destination is an existing directory, the
file is copied into the directory (the directory is not overwritten).
Syntax :- cp [options]... source destination
18) rm:- It is used to remove/delete the file from the directory.
Syntax :- cp [options]... source destination
19) mv:- It is used to move/rename file from one directory to another.
Syntax :- mv [options] oldname newname
20) nl :- nl numbers the lines in a file.
Syntax: - nl [OPTION] [FILE]
21) cut :- cut command is used to cut out selected fields of each line of a file.
The cut command uses delimiters to determine where to split fields.
Syntax :- cut [options] filename
22) paste:- paste command is used to paste the content from one file to another file. It
is also used to set column format for each line.
Syntax :- paste [option] file
23) more:- Displays text one screen at a time.
Syntax :- more [options] filename
24) cmp:- It compares two files and tells you which line numbers are different.
Syntax : - cmp [options..] file1 file2
25) comm:- compare two sorted files line by line
Syntax:- comm [option]... FILE1 FILE2
26) diff:- It is used to find differences between two files.
Syntax :- diff [options..] file1 file2
27) chmod:- chmod command allows you to alter / Change access rights to
files and directories.
Syntax:- chmod [options] [MODE] FileName
28) chown:- Command for system V that changes the owner of a file.
Syntax :- chown [options] newowner filename/directoryname
29) chgrp:- chgrp command is used to change the group of the file or directory.
This is an admin command. Root user only can change the group of the file or
directory.
Syntax:- chgrp [options] newgroup filename/directoryname
30) file:- file command tells you if the object you are looking at is a file or a directory.
Syntax:- file [options] directoryname/filename
31) finger:- finger command displays the user's login name, real name, terminal name
and write status (as a ''*'' after the terminal name if write permission is denied), idle
time, login time, office location and office phone number.
Syntax:- finger [username]
32) sleep:- Delay for a specified amount of time
Syntax :- sleep NUMBER[SUFFIX]
33) kill:- kill command is used to kill the background process.
Syntax:- kill [options] pid
34) users :- users command displays currently logged in users.
Syntax:- users
35) ps:- It is used to report the process status. ps is the short name for Process Status.
Syntax:- ps [options]
36) ln :- ln command is used to create link to a file (or) directory. It helps to provide
soft link for desired files.
Syntax:- ln [options] existingfile(or directory)name newfile(or directory)name
37) head:- head command is used to display the first ten lines of a file, and also
specifies how many lines to display.
Syntax:- head [options] filename
38) tail:- tail command is used to display the last or bottom part of the file. By
default it displays last 10 lines of a file.
Syntax :- tail [options] filename
39) sort:- It is used to sort the lines in a text file.
Syntax:- sort [options] filename
40) find:- Finds one or more files assuming that you know their approximate path.
Syntax :- find [options] path
41) uniq:- Report or filter out repeated lines in a file.
Syntax:- uniq [option] filename
42) tr:- Translate characters.
Syntax:- tr [options] set1 [set2]
43) history:- history command is used to list out the recently executed commands
in thenumber line order.
Syntax:- history [options]
44) write:- Send a message to another user.
Syntax:- write person [ttyname]
45) grep:- It selects and prints the lines from a file which matches a given string or
pattern.
Syntax:- grep [options] pattern [file]
46) pwd:-Displaying your current directory name (Print working directory).
Syntax:-pwd [options]
47) wc:- Word Count (wc) command counts and displays the number of lines,
words, character and number of bytes enclosed in a file.
Syntax: - wc [options] [filename]
48) man:- man command which is short for manual, provides in depth information about
the requested command (or) allows users to search for commands related to a
particular keyword.
Syntax:- man commandname [options]
49) | (Pipeline command):- Used to combine more than one command. Takes
output of 1stcommand as input of 2nd command.
Syntax:- commmand1| command2|……
Basic System Administration Commands Of UNIX
1) date : - Prints or sets the date and time.
Syntax :- date[options] [+format] [date]
2) wall :- send a message to everybody's terminal.
Syntax :- wall [ message ]
3) passwd:- It is used to change your password.
Syntax:- passwd
4) suid :- set user id