Skip to content

Instantly share code, notes, and snippets.

@giannigdev giannigdev/UnixCommands.md
Last active Aug 29, 2015

Embed
What would you like to do?
Unix Commands (Work in progress...this list will be updated/filtered with the most common used commands)

Unix Commands

Documentation

  • find - locate file (i.e. find . -name *.tex -print)
  • info - start the info explorer program
  • man - find manual information about commands
  • whatis - describe what a command is
  • whereis - locate source, binary, or man page for a program

Access Control

  • exit - terminate a shell (see "man sh" or "man csh")
  • logout - sign off; end session (C shell and bash shell only;)
  • passwd - change login password
  • rlogin - log in remotely to another UNIX system
  • ssh - secure shell
  • slogin - secure version of rlogin
  • yppasswd - change login password in yellow pages

Communication

  • mail - send and receive mail
  • mesg - permit or deny terminal messages and talk requests
  • pine - send and receive mail
  • talk - talk to another logged-in user
  • write - write to another logged-in user

Programming Tools

  • as - assembler, specific to each machine architecture
  • awk - pattern scanning and processing language
  • bc - online calculator
  • csh - C shell command interpreter
  • kill - kill a process(do no apply to daemons)(required PID of the app)
  • killall - kill all the process(do no apply to daemons)(required PID of the app)
  • make - maintain large programs
  • nice - run a command at low priority (see "man nice" or "man csh")
  • perl - Popular script interpreter

Editors

  • emacs - screen-oriented text editor
  • pico - screen-oriented text editor (renamed called nano)
  • sed - stream-oriented text editor
  • vi - full-screen text editor
  • vim - full-screen text editor ("vi-improved")
  • nano - Nano text Editor

File and Direcotory management

  • mount/unmount - mount/unmount removable media
  • cd - change working directory
  • chmod - change the protection of a file or directory
  • chown - change owner (or group) of a file or directory
  • chgrp - change group of a file or directory
  • cmp - compare two files
  • comm - select/reject lines common to two sorted files
  • cp - copy files
  • crypt - encrypt/decrypt files (CCWF only)
  • diff - compare the contents of two ASCII files
  • file - determine file type
  • grep - search a file for a pattern
  • gzip - compress or expand files
  • ln - make a link to a file
  • ls - list the contents of a directory
  • ls -1 - list the contents of a directory one by line
  • lsof - list of open files
  • open -a - Open file with the specific applicatiob
  • mkdir - create a directory
  • mv - move or rename files and directories
  • pwd - show the full pathname of your working directory
  • quota - display disk usage and limits
  • rm - delete (remove) files
  • rmdir - delete (remove) directories
  • stat - status of file (i.e. last access)
  • sync - flush filesystem buffers
  • sort - sort or merge files
  • tar - create or extract archives
  • tee - copy input to standard output and other files
  • tr - translate characters
  • umask - change default file protections
  • uncompress - restore compressed file
  • uniq - report (or delete) repeated lines in a file
  • wc - count lines, words, and characters in a file

File Display & Printing

  • cat - show the contents of a file; catenate files
  • fold - fold long lines to fit output device
  • head - show first few lines of a file
  • lpq - examine the printer spooling queue
  • lpr - print a file
  • lprm - remove jobs from the printer spooling queue
  • more - display a file, one screen at a time
  • less - like more with more features
  • page - like "more", but prints screens top to bottom
  • pr - paginate a file for printing
  • tail - show the last part of a file
  • zcat - display a compressed file
  • xv - show print, manipulate images
  • gv - show ps and pdf files

File Transfer

  • ftp - transfer files between network hosts
  • rsync - fast and flexible sync between computers
  • scp - secure version of rcp
  • curl - transfer data from or to a server

Miscellaneous

  • alias - define synonym commands
  • chquota - change disk quota on ACITS UNIX systems
  • chsh - change default login shell
  • clear - clear terminal screen
  • echo - echo arguments
  • pbm - portable bitmap manipulation programs
  • popd - pop the directory stack (C shell only)
  • pushd - push directory on stack (C shell only)
  • script - make typescript of terminal session
  • setenv - set an environment variable (C shell only)
  • stty - set terminal options

Network

  • netstat - show network status
  • rsh - run shell or command on another UNIX system
  • ssh - secure-shell version of rsh

Process Control

  • bg - put suspended process into background
  • fg - bring process into foreground
  • jobs - list processes
  • ^y - suspend process at next input request
  • ^z - suspend current process

Status Information

  • ps aux|grep {path of the app} - show the PID of the app(use with top)
  • dmesg - Display the messages from the kernel buffer
  • clock - determine processor time
  • date - show date and time
  • df - summarize free disk space
  • du - summarize disk space used
  • env - display environment
  • finger - look up user information
  • history - list previously issued commands
  • last - indicate last login of users
  • lpq - examine spool queue
  • manpath - show search path for man pages
  • printenv - print out environment
  • ps - show process status
  • pwd - print full pathname of working directory
  • set - set shell variables (C shell, bash, or ksh)
  • spend - lists year-to-date ACITS UNIX charges
  • stty - set terminal options
  • time - timing programs
  • top - list top cpu processes
  • uptime - show system load, how long system has been up
  • w - show who is on system, what command each job is executing
  • who - show who is logged onto the system
  • whois - Internet user name directory service
  • whoami - who owns the shell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.