Command Line Cheat Sheet
From ArkWiki
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
| Command | What it does |
|---|---|
| apt-cache | Searches apt-get for software you specify |
| apt-get - is a root command in other distros, but not Ark | Installs Software |
| cd | Changes to a different directory |
| chmod | Changes read/write/execute permissions on a file or directory |
| chown | Changes the owner for a file or directory |
| eject | Ejects any unmounted disk that can be ejected without a button (such as a CD-ROM) |
| glxinfo | Displays information on your graphics card |
| grep pattern | Searches a file or output from another command for pattern |
| ln | Creates a link to a file or directory |
| ls | lists the files and directories in a directory; if no directory is specified, it will assume to list for the current directory |
| passwd | Sets the current user's password |
| rm | Removes a file |
| rm -r | Removes a directory |
[edit] Root commands
| Command | What it does |
|---|---|
| alsaconf | Resets your audio card |
| adduser username | Adds a user called username |
| chmod | Changes read/write/execute permissions on a file or directory |
| chown | Changes the owner for a file or directory |
| dhclient | Registers an IP address from a DHCP Host |
| fdisk | Command-line version of QtParted |
| fsck | Performs a file system check |
| ifconfig | Configures an Ethernet connection |
| ifdown | Turns off a network device |
| ifup | Turns on a network device |
| iwconfig | Configures a wireless network connection |
| mkswap | Makes a swap partition |
| mount | Mounts (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 username | Sets the password for the specified username |
| service | Turns a specified service on or off, or restarts a specified service |
| swapon | Turns on all swap partitions, unless a partition is specified |
| swapoff | turns off all swap partitions, uless a partition is specified |
| umount | Unmounts (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 username | Deletes the user called username |
Examples on using some commands
| Previous | Table Of Contents | Next |
