|Cool Stuff||CLI Cheet Sheet|
(shows an updating list of processes and cpu use.)
(lists current processes.)
(changes directory - i.e. "cd ~/Desktop" changes to the Desktop folder in your home folder.)
(lists the contents of the current directory. You can optionally add a path to the command to list the contents of a directory that is not the current directory. i.e "ls ~/Desktop". This works for the following command as well.)
(shows hidden files, and gives additional info. This is really just the "ls" command, with a two optional arguments. The "l" shows the extra info, and the "a" shows the hidden files.)
(makes a directory, with the name specified.)
THIS IS A VERY DANGEROUS COMMAND. YOU SHOULD NOT TYPE IT UNLESS YOU ARE SURE YOU WANT TO. This command deletes the specified file, WITHOUT DOUBLE-CHECKING. It also deletes it forever. (It doesn't move it to the recycle bin or anything nice like that... If you change your mind... Sorry IT'S GONE! i.e. "rm importantHomeworkFile" OOPS! DID YOU WANT THAT? SORRY! IT'S GONE! This command gets even more dangerous if you use the optional arguments "-rf". The "r" means that it can delete whole folders rather than just files, and the "f" means that IT WON'T CHECK TO SEE IF YOU REALLY MEANT TO DO THAT!
(tells you what your present working directory is.)
(gives you detailed info about different commands. For instance, "man ls" will tell you all about the "ls" command.)
(This isn't really a command. It is a "pipe". You can find the symbol on the same key as the backslash. It takes the output of the command before it, and pipes it to the input of the command after it. i.e. "pwd | ls". This takes the output of "pwd" and passes it as input to "ls". I will show you some more cool uses below.)
(finds patterns in text piped to it. i.e. "ls | grep e" will search the output from "ls", and only display results containing the letter "e".)
(this is like "ls", in that in that it displays all the files in the path given. However, it also displays all the files in the lower directories as well. You can use it to search for specific files by piping the output to grep as follows.
find ~/Desktop | grep word
This looks through every folder and file in your Desktop folder, and searches for the word "word". You can search your current directory using:
find . | grep word
The "." is a shorthand for the current directory.)
(This can be placed in front of commands to indicate that they should be executed with root permissions. i.e. If you want to create a directory in a system directory, you won't be allowed to make it without using sudo. To make it, use
sudo mkdir directoryName
It will ask for your root password, and then you will be able to make the directory.)
(This can be used to install various useful things. However, because it is usually adding files to system directories, you need to run it as root using "sudo". i.e.
sudo apt-get install vim This installs the command line text editor "vim".