Topic: Basic Ubuntu Commands

[size=4]Read this list of basic commands and become familiar with them.[/size]

sudo ("superuser do") - Allows you to run other commands with administrative privileges. This is useful when, for example, you need to modify files in a directory that your user wouldn't normally have access to.

cd ("change directory") - Changes the directory you are currently working in. You can use full paths to folders or simply the name of a folder within the directory you are currently working. Some common uses:


cd / - Takes you to the root directory.
cd .. - Takes you up one directory level.
cd - - Takes you to the previous directory.


pwd ("print working directory") - Displays the directory you are currently in.

ls ("list") - Lists all files and folders in your current working directory. You can also specify paths to other directories if you want to view their contents.


cp ("copy") - Allows you to copy a file. You should specify both the file you want copied and the location you want it copied to - for example, cp foo /home/john would copy the file "foo" to the directory "/home/john".


mv ("move") - Allows you to move files. You can also rename files by moving them to the directory they are currently in, but under a new name. The usage is the same as cp - mv foo /home/john would move the file "foo" to the directory "/home/john".


rm ("remove") - Removes the specified file.


rmdir ("remove directory") - Removes an empty directory.


rm -r ("remove recursively") - Removes a directory along with its content.


mkdir ("make directory") - Allows you to create a new directory. You can specify where you want the directory created - if you do not do so, it will be created in your current working directory.


history - Displays all of your previous commands up to the history limit.

----------------------------------------------------------------------------------------------------------------------------------------
[size=18]  nomicons/smile "The best way to learn anything, is to question everything."[/size]  nomicons/smile
----------------------------------------------------------------------------------------------------------------------------------------

Share