Sunteți pe pagina 1din 2

top (shows an updating list of processes and cpu use.) ps -A (lists current processes.) cd (changes directory - i.e.

"cd ~/Desktop" changes to the Desktop folder in your h ome folder.) ls (lists the contents of the current directory. You can optionally add a path to t he 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.) ls -la (shows hidden files, and gives additional info. This is really just the "ls" com mand, with a two optional arguments. The "l" shows the extra info, and the "a" s hows the hidden files.) mkdir name (makes a directory, with the name specified.) rm 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 a lso 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 importantHomew orkFile" 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 del ete whole folders rather than just files, and the "f" means that IT WON'T CHECK TO SEE IF YOU REALLY MEANT TO DO THAT! pwd (tells you what your present working directory is.) man (gives you detailed info about different commands. For instance, "man ls" will t ell you all about the "ls" command.) |

(This isn't really a command. It is a "pipe". You can find the symbol on the sam e 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 bel ow.) grep pattern (finds patterns in text piped to it. i.e. "ls | grep e" will search the output f rom "ls", and only display results containing the letter "e".) find path (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 c an 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 fo r the word "word". You can search your current directory using: find . | grep word The "." is a shorthand for the current directory.) sudo (This can be placed in front of commands to indicate that they should be execute d with root permissions. i.e. If you want to create a directory in a system dire ctory, 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 direct ory.) apt-get install (This can be used to install various useful things. However, because it is usual ly 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".