Introduction

So, have you gone through the basics of Linux and now want to delve into the Terminal? This article will explain what exactly the Terminal is, why we use it, and will show you some basic, commonly used, commands. When using the Terminal you should always be careful however, and should always research a command before using it. A good selection of commands is listed  here .

Please note that these commands are for Debian based linux distributions only.

So, what exactly is the Terminal?

The Terminal, or the Linux console, was the very first way to input commands into Linux, and runs in a pure-text mode, meaning no mouse is needed. It is basically the backbone of the Linux operating system. You use commands to carry out actions. If you're familiar with the Windows Commands Prompt (CMD) then you'll find it easy to use, however in my opinion it is a lot more powerful, due to the number of commands and programs you can run.

The way to access the Terminal will vary from distro to distro, and depends on your Desktop Enviroment.

Note: It is possible to create a simple program using the Terminal, called BASH programming (similar to a Windows Batch file). However, this won't be covered in this tutorial.

Some basic commands

There are a lot of different commands, with a lot of different options. However, this will be saved for a later tutorial. For now, lets focus on some commands, and what they do. Please also remember that these are mainly for Debian based distributions only.

Code:
sudo
: This is one of the most important commands, however it should not be used lightly. If you place sudo before a command, then that command will run as root, giving you a lot more privileges than before. However, the use of this command is not recommend unless you know what you are doing, or you are asked to by a reliable source - it is easy to mess up your computer when in the Terminal.

Example:

Code:
sudo apt-get update
Code:
apt-get install
: Apt-get is the command line program for installing programs, and is very useful. If you want to install a program, then you need to use
Code:
sudo apt-get install
packagename.

Example:

Code:
sudo apt-get install google-chrome-stable
Code:
apt-get update
: This is used to update your installations package index, and should be used regularly, especially before running the next command, apt-get upgrade. This also needs to be used with the 
Code:
sudo
 command.

Example:

Code:
sudo apt-get update
Code:
apt-get upgrade
: This will update your Linux distribution, as well as updating any packages (programs) you have installed. This command needs to be used with sudo.

Example:

Code:
sudo apt-get upgrade
Code:
--help
: When using --help, another command always needs to be placed in front. This will display help for the command, including what it's uses are, and it's options. It is a very useful tool.

Example:

Code:
ls --help
Code:
ls
: This command displays the files in your current directory.

Example:

Code:
ls
Code:
cd
:This will change your current directory. You need to place the directory you want to "enter" after the
Code:
cd
. ~ stand for home.

Example:

Code:
cd ~/Documents
Code:
man
:
Code:
man
is short for manual, and when using it you need to place a command name after it. This command will open up a page explaining the command.

Example:

Code:
man ls
Conclusion

This tutorial has barely scratched the surface of what the Terminal can do, but I hope it has made you want to learn more. If you can use the Terminal, you can do anything in Linux.

I do have two more things to say first though. First of all, DO NOT use a command if you don't know what it does. It could completely erase your disk, for all you know. Look it up first. DO, however have fun.

© 2012 AndroidOS