Ubuntu and most Linux distributions have a software program quite similar with the Command line in Windows, which is called "Terminal." Like the Command line, Terminal has a wide variety of uses for computer users of all skill levels, from the casual user to the experienced programmer. Learning how to use Terminal can greatly enhance your ability to use your Linux computer to its full potential.
Steps
- 1First off, a little bit of information on what different commands associated with files and directory mean.
- sudo ("superuser do"): A very common expression which indicates that the taken action must be verified with the admin password.
- cd ("change directory"): With this command you can navigate your way throughout the system. Simply typing "cd" or "cd ~" will take you to the homefolder, which is the folder you are located in by default when starting up a Terminal session.
- 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"): It displays your location in the system.
- ls ("list"): Lists all files in current directory. Typing "ls ~" will show you the files in your home folder and adding on a folder name shows a list over the files in that specific folder. For example will "ls ~/Desktop" show you the files in yourDesktop folder.
- cp ("copy"): Allows you to copy a file. To do so, add the name of the file you desire to copy along with the command as long as the file is located in the directory you have browsed to. Otherwise, type "cp ~/<file path>" in order to specify where the file you want copy is located.
- mv ("move"): With this command, you can rename or move a file. If you want to rename the file "big" to "bang", you may want to type "mv big bang". This requires that you have browsed to the correct directory or that you specifies the file path. When typing "mv bang ~/Desktop", the file "bang" will be moved fromhome to Desktop, but if you want to rename the file as well, add the new file name next to the current name in the command.
- rm ("remove"): Simply removes a file. Just specify the file path/file name.
- rmdir ("remove directory"): Removes an 'empty' directory.
- rm-r ("remove recursively"): Removes a directory along with its content. The fact that you should specify the directory path is self-explaining.
- mkdir ("make directory"): Allows you to create a directory. Example: "mkdir private files" will create a directory named "private files" (Located in homedirectory unless you have browsed somewhere else with the terminal or specified a path for the new directory)