Common Unix Command for Current Unix Platforms
Disclaimer: Whenever in doubt, please refer to the manual pages on
your operating system.
1. man - manual pages
The man command displays information from the reference
manuals. It displays complete manual pages that you select
by name or one-line summaries selected either by keyword
(-k), or by the name of an associated file (-f). If no
manual page is located, man prints an error message.
2. passwd - change login password and password attributes
3. date - The date utility writes the date and time to standard output
or attempts to set the system date and time. By default, the current date
and time will be written.
4. who - The who utility can list the user's name, terminal line,
login time, elapsed time since activity occurred on the
line, and the process-ID of the command interpreter (shell)
for each current UNIX system user.
5. whoami - lists who you are (HP, AIX..)
who am i -> on SUN
6. cal - The cal utility writes a Gregorian calendar to standard output.
If the year operand is specified, a calendar for that
year is written. If no operands are specified, a calendar
for the current month is written.
7. pwd - pwd writes an absolute path name of the current working
directory to standard output.
8. cd - The cd utility will change the working directory of the
current shell execution environment.
9. ls - For each file that is a directory, ls lists the contents of
the directory; for each file that is an ordinary file, ls
repeats its name and any other information requested.
10. more - The more utility is a filter that displays the contents of a
text file on the terminal, one screenful at a time. It nor-
mally pauses after each screenful.
11. cat - cat reads each file in sequence and writes it on the standard
12. mkdir - The mkdir command creates the named directories in mode 777
(possibly altered by the file mode creation mask umask(1)
13. mv - In the first synopsis form, the mv utility moves the file
named by the source operand to the destination specified by
the "target_file". Source and "target_file" may not have the
14. cp - The cp utility will copy the contents of source_file
to the destination path named by "target_file".
15. rm - The rm utility removes the directory entry specified by each
16. rmdir - The rm utility removes the directory entry specified by each
17. chmod - change the permission of a file.
Ex: chmod +x tempfile (add execute permission)
chmod u+x tempfile (add execute for user only)
chmod 6755 oracle (set the setuid bit on)
18. grep - The grep utility searches files for a pattern and prints all
lines that contain that pattern. It uses a compact non-
19. find - search for files.
Ex: find . -name sqlplus -print (find the full pathname of sqlplus
starting from the current directory)
find . -name '*sql*' -print (find the full pathname of file where
'sql' is in its name)
20. wc - The wc utility reads one or more input files and, by
default, writes the number of newline characters, words and
bytes contained in each input file to the standard output.
21. ps - The ps command prints information about active processes.
Without options, ps prints information about processes associated
with the controlling terminal.
22. kill - send a signal to terminate a process.
Ex: kill -9 (signal will always be caught)
23. id - If no user operand is provided, the id utility will write
the user and group IDs and the corresponding user and group
names of the invoking process to standard output:
24. df - The df command displays the amount of disk space occupied by
mounted or unmounted file systems, directories, or mounted
resources, the amount of used and available space, and how
much of the file system's total capacity has been used.
/ (/dev/md/dsk/d0 ): 1816668 blocks 1683304 files
/proc (/proc ): 0 blocks 3721 files
/dev/fd (fd ): 0 blocks 0 files
/u01 (/dev/dsk/c1t1d0s0 ): 3207990 blocks 4099598 files
/u02 (/dev/dsk/c1t2d0s0 ): 2981898 blocks 4108008 files
25. du - The du utility writes to standard output the size of the
file space allocated to, and the size of the file space
allocated to each subdirectory of, the file hierarchy rooted
in each of the specified files.
26. lpr - The lpr utility submits print requests to a destination.
lpr prints files (file) and associated information,
collectively called a print request.
27. uname - The uname utility prints information about the current
system on the standard output. When options are specified,
symbols representing one or more system characteristics will be
written to the standard output.
Ex. uname -a (list all info)
SunOS supsunm3 5.6 Generic_105181-08 sun4u sparc SUNW,Ultra-5_10
28. nm - The nm utility displays the symbol table of each ELF object
file that is specified by file.
29. ar - The ar utility maintains groups of files combined into a
single archive file. Its main use is to create and update
/usr/ccs/bin/ar -d [ -Vv ] archive file...
/usr/ccs/bin/ar -m [ -abiVv ] [ posname ] archive file...
/usr/ccs/bin/ar -p [ -sVv ] archive [file...]
/usr/ccs/bin/ar -q [ -cVv ] archive file...
/usr/ccs/bin/ar -r [ -abciuVv ] [ posname ] archive file...
/usr/ccs/bin/ar -t [ -sVv ] archive [file...]
/usr/ccs/bin/ar -x [ -CsTVv ] archive [file...]
30. ipcs - The utility ipcs prints information about active
interprocess communication facilities. The information that is
displayed is controlled by the options supplied.
-m Print information about active shared memory
-q Print information about active message
-s Print information about active semaphores.
31. ipcrm - ipcrm removes one or more messages, semaphores or shared
-m shmid Remove the shared memory identifier shmid
from the system. The shared memory segment
and data structure associated with it are
destroyed after the last detach.
-q msqid Remove the message queue identifier msqid
from the system and destroy the message queue
and data structure associated with it.
-s semid Remove the semaphore identifier semid from
the system and destroy the set of semaphores
and data structure associated with it.
32. chown - The chown utility will set the user ID of the file named by
each file to the user ID specified by owner and, optionally,
will set the group ID to that specified by group.
33. chgrp - The chgrp utility will set the group ID of the file named by
each file operand to the group ID specified by the group
34. newgrp - The newgrp command logs a user into a new group by changing
a user's real and effective group ID. The user remains
logged in and the current directory is unchanged.
Ex: newgrp dba (switch group to dba)
35. file - The file utility performs a series of tests on each file
supplied by file and, optionally, on each file listed in
ffile in an attempt to classify it.
36. ln - the ln utility creates a new directory entry (link) for the file
specified by source_file at the destination path specified by target.
If target is not specified, the link is made in the current directory.
37. su - su allows one to become another user without logging off.
The default user name is root (super user).
38. dd - dd copies the specified input file to the specified output
with possible conversions. The standard input and output
are used by default.
Ex: dd if=myfile of=newfile conv=ucase (converts to uppercase)
39. diff - The diff utility will compare the contents of file1 and
file2 and write to standard output a list of changes
necessary to convert file1 into file2.
40. umask - The umask utility sets the file mode creation mask of the
current shell execution environment to the value specified
by the mask operand. This mask affects the initial value of
the file permission bits of subsequently created files. If
umask is called in a subshell or separate utility execution
environment, such as one of the following:
nohup umask ...
find . -exec umask ...
it does not affect the file mode creation mask of the
41. stty - The stty command sets certain terminal I/O options for the
device that is the current standard input; without arguments, it
reports the settings of certain options.
speed 38400 baud; -parity
swtch = <undef>;
brkint -inpck icrnl -ixany imaxbel onlcr tab3
echo echoe echok echoctl echoke iexten
42. tty - The tty utility writes to the standard output the name of
the terminal that is open as standard input. The name that
is used is equivalent to the string that would be returned
by the ttyname(3C) function.
43. cpio - The cpio command copies files into and out from a cpio
archive. The cpio archive may span multiple volumes. The
-i, -o, and -p options select the action to be performed.
Ex: cpio -icBdvmu < /dev/rmt0
44. tar - The tar command archives and extracts files to and from a
single file called a tarfile. A tarfile is usually a
magnetic tape, but it can be any file. tar's actions are
controlled by the key argument. The key is a string of
characters containing exactly one function letter (c, r, t , u, or
x) and zero or more function modifiers (letters or digits),
depending on the function letter used.
Ex: tar xvt /dev/rmt0
45. telnet - telnet communicates with another host using the TELNET
protocol. If telnet is invoked without arguments, it enters
command mode, indicated by its prompt telnet>. In this
mode, it accepts and executes its associated commands.
46. rlogin - rlogin establishes a remote login session from your terminal
to the remote machine named hostname.
47. echo - The echo utility writes its arguments, separated by BLANKs
and terminated by a NEWLINE, to the standard output. If
there are no arguments, only the NEWLINE character will be
48. ulimit - (att) - The ulimit utility sets or reports the file-size
writing limit imposed on files written by the shell and its child
processes (files of any size may be read). Only a process
with appropriate privileges can increase the limit.
49. vmstat - vmstat delves into the system and reports certain statistics
kept about process, virtual memory, disk, trap and CPU
NOTE: vmstat statistics are only supported for
50. make - this is a command generator. All executables used in
ORACLE are generated from makefiles. The make utility executes a
list of shell commands associated with each target,
typically to create or update a file of the same name.
makefile contains entries that describe how to bring a target up to
date with respect to those on which it depends, which are called
dependencies. Since each dependency is a target, it may have
dependencies of its own.
51. env - The env utility obtains the current environment, modifies it
according to its arguments, then invokes the utility named
by the utility operand with the modified environment.
53. logname - The logname utility will write the user's login name to
54. swap -l swap provides a method of adding, deleting, and monitoring
the system swap areas used by the memory manager.
Use the commands listed below for the associated operating
SUN Solaris #/usr/sbin/swap -l
HP 9000 Series HP-UX # /etc/swapinfo
Digital UNIX % /usr/sbin/swapon -s
IBM RS/6000 AIX % /etc/lsps -a
55. whatis (/usr/ucb/whatis) commands -> looks up one or more commands
in the on-line man pages, and display a brief description.
$ whatis man
man man (1) - find and display reference manual pages
man man (5) - macros to format Reference Manual pages
56. bfs [option] file -> big file scanner.
Read a large file, using ed-like sysntax. Files can be up to 1024 KB.
57. hostname - The hostname command prints the name of the current host, as
given before the login prompt. The superuser can set the
hostname by giving an argument.
58. hostid - The hostid command prints the identifier of the current host
in hexadecimal. This numeric value is likely to differ when
hostid is run on a different machine.
59. nohup - The nohup utility invokes the named command with the
arguments supplied. When the command is invoked, nohup arranges
for the SIGHUP signal to be ignored by the process.
The nohup utility can be used when it is known that command
will take a long time to run and the user wants to logout of
the terminal; when a shell exits, the system sends its chil-
dren SIGHUP signals, which by default cause them to be
killed. All stopped, running, and background jobs will
ignore SIGHUP and continue running, if their invocation is
preceded by the nohup command or if the process programmati-
cally has chosen to ignore SIGHUP.
60. pg - The pg command is a filter that allows the examination of
filenames one screenful at a time on a CRT. If the user
types a RETURN, another page is displayed; other possibili-
ties are listed below.
61. printenv - printenv prints out the values of the variables in the
environment. If a variable is specified, only
its value is printed.
62. rwho - The rwho command produces output similar to who(1), but for
all machines on your network. If no report has been
received from a machine for 5 minutes, rwho assumes the
machine is down, and does not report users last known to be
logged into that machine
63 sed - The sed utility is a stream editor that reads one or more
text files, makes editing changes according to a script of
editing commands, and writes the results to standard output
-e script script is an edit command for sed. See USAGE
below for more information on the format of
script. If there is just one -e option and
no -f options, the flag -e may be omitted.
-f script_file Take the script from script_file.
script_file consists of editing commands, one
-n Suppress the default output.
64. talk - The talk utility is a two-way, screen-oriented communication
When first invoked, talk sends a message similar to:
Message from TalkDaemon@ her_machine at time ...
talk: connection requested by your_address
talk: respond with: talk your_address
to the specified address. At this point, the recipient of
the message can reply by typing:
65. uptime - The uptime command prints the current time, the length of
time the system has been up, and the average number of jobs
in the run queue over the last 1, 5 and 15 minutes.
10:47am up 27 day(s), 50 mins, 1 user,
load average: 0.18, 0.26, 00
66. vi - vi (visual) is a display-oriented text editor based on an
underlying line editor ex. It is possible to use the com-
mand mode of ex from within vi and to use the command mode
of vi from within ex.
67. which - which takes a list of names and looks for the files which
would be executed had these names been given as commands.
Each argument is expanded if it is aliased, and searched for
along the user's path. Both aliases and path are taken from
the user's .cshrc file
Ex: $ which svrmgrl
68. shutdown - shutdown is executed by the super-user to change the state
of the machine. In most cases, it is used to change from
the multi-user state (state 2) to another state.
By default, shutdown brings the system to a state where only
the console has access to the operating system. This state
is called single-user.
69. reboot - reboot restarts the kernel. The kernel is loaded into
memory by the PROM monitor, which transfers control to the
loaded kernel. Although reboot can be run by the super-user at any time,
shutdown(1M) is normally used first to warn all users logged
in of the impending loss of service.
70. init is a general process spawner. Its primary role is to
create processes from information stored in the file