This cheatsheet deals with commonly used Linux commands executed from the command line. Most or all of these commands should work using any common unix shell interface, but this is written from the point of view of a bash user, so if there's anything here that doesn't work in another shell you will at least know why. Because this is not intended to give comprehensive instructions on all commonly available commands, but only on those deemed most commonly important by the author, this will never be a comprehensive list. Some commands herein may require that a given package needs to be installed on your system if it is not already present. Commands that open captive interfaces requiring their own instructions are not included here, and may be (or become) the subject of other cheatsheets. apt-cache search [string] search for packages matching string apt-cache show [package] display summary detail of specified package apt-get autoclean clean out cruft in local cache of packages apt-get install [package] download and install package and dependencies apt-get update download updated package list for local cache apt-get upgrade upgrade installed packages to newest versions aptitude [search|show|autoclean|install|update|upgrade] same purpose as apt-cache and apt-get, unified cal [month] [yyyy] output formatted calendar: optional month and year arguments cat [filename] output the contents of (a) file(s) cd [destination] change directory cdrecord dev=[path] [filename] commonly used to burn CD from image chgrp [group] [filename] change group ownership of a file chmod [nnn] [filename] change access permissions chown [user] [filename] change ownership characteristics of a file clear clears the screen date display the current date and time dd if=[inputfile] of=[outputfile] commonly used to make bootable floppy from image df -h display disk usage by partition du -h display disk usage by directory echo [string] print the string to STDOUT exit log out grep [string] input to grep is filtered for a search string gunzip [filename] unzip a gzip file gzip [filename] zip a gzip file head [filename] display the first ten lines of a file id output user and group names and IDs less [filename] display filename in a manner that allows scrolling and paging q=exit, ctrl-d=pagedown, ctrl-u=pageup, arrows=scroll locate [string] list all files that match a search string ls list directory contents ls -a list all directory contents, including hidden ls -al list all directory contents in long format ls -l list directory contents in long format man [command|file] display manpage for specified command or file man -f [command|file] display short description from manpage if it exists man [n] [command|file] display manpage number n for specified command or file "man 7 man" displays man(7) mkdir [directoryname] create a new directory mount displays currently mounted partitions mount [device] [directory] mounts specified device in indicated directory mv [filename] [path|filename] move and/or rename a file or directory passwd change current user's password ping [host|ip] ping at regular intervals ping -c [n] [host|ip] ping n times then exit ps aux list running processes pwd path to working directory rm [filename] remove/delete a file rm -r [directoryname] remove/delete a directory and all its contents rmdir [directoryname] remove/delete a directory sftp [host|ip] ftp over ssh sftp -oPort=[port] [host|ip] ftp over ssh on nonstandard port ssh [host|ip] connect to an ssh server ssh -p [port] [host|ip] connect to an ssh server on nonstandard port tail [filename] display last ten lines of a file tar -czf [archivename].tar.gz [sourcefilename] create a gzipped tarball; more than one filename may be specified tar -zxf [filename] expand the contents of a gzipped tarball (.tar.gz file) wc [filename] get line, word, and character count of a file yafc [host|ip] yet another ftp client