Command Line Cheat Sheet

From ArkWiki

Jump to: navigation, search

Some commands will be listed as both a root and a non-root command because they can sometimes work differently, if only slightly.

One quick note: You will see the words directory and directories below. The Windows/Macintosh equivalent to a directory is a folder.

[edit] Non-Root Commands - Commands that can be run as both root and a normal user

CommandWhat it does
apt-cacheSearches apt-get for software you specify
apt-get - is a root command in other distros, but not ArkInstalls Software
cdChanges to a different directory
chmodChanges read/write/execute permissions on a file or directory
chownChanges the owner for a file or directory
ejectEjects any unmounted disk that can be ejected without a button (such as a CD-ROM)
glxinfoDisplays information on your graphics card
grep patternSearches a file or output from another command for pattern
lnCreates a link to a file or directory
lslists the files and directories in a directory; if no directory is specified, it will assume to list for the current directory
passwdSets the current user's password
rmRemoves a file
rm -rRemoves a directory

[edit] Root commands

CommandWhat it does
alsaconfResets your audio card
adduser usernameAdds a user called username
chmodChanges read/write/execute permissions on a file or directory
chownChanges the owner for a file or directory
dhclientRegisters an IP address from a DHCP Host
fdiskCommand-line version of QtParted
fsckPerforms a file system check
ifconfigConfigures an Ethernet connection
ifdownTurns off a network device
ifupTurns on a network device
iwconfigConfigures a wireless network connection
mkswapMakes a swap partition
mountMounts (loads) a disk so that it's files can be accessed, and (for writable disks such as a floppy or flash drive) makes it so that the disk can be written to
passwd usernameSets the password for the specified username
serviceTurns a specified service on or off, or restarts a specified service
swaponTurns on all swap partitions, unless a partition is specified
swapoffturns off all swap partitions, uless a partition is specified
umountUnmounts (unloads) a disks so it's files can no longer be accessed. For writable disks (such as a floppy or flash drive), finishes all processes that are currently writing to the disk and "flushes" (cleans) the disk cache
userdel usernameDeletes the user called username

Examples on using some commands



PreviousTable Of ContentsNext

Main Page

Personal tools