Beginners Guide to the Ubuntu Terminal

The Terminal window is often a barrier for new Linux users blocking them from effectively using the Linux desktop. Many users have been using point and click methods of desktop navigation since MS-DOS in the 80s. The idea of typing text into a command window can be a bit overwhelming for todays average computer user but it shouldn't be. Today we'll be using the Ubuntu 8.10 desktop which is available for download here.

The advantages of using the command-line Terminal to accomplish tasks are great. The speed of using the terminal in a fraction of that it takes to accomplish the same task graphically. Try installing a package using the synaptic package manager. That would include at least six clicks of the mouse and typing in the root password once. Or you could use the terminal by clicking on Applications --- Accessories --- Terminal. (Kubuntu users click Menu --- System --- Konsole, Xubuntu users click Applications --- Accessories --- Terminal) Once you've opened the Terminal with your first click you can type
sudo apt-get install amarok

Then enter the root password and that's it. You package will be downloaded and installed from the terminal window.

sudo apt-get command on Ubuntu terminal

From this example you can see the difference in speed, but another advantage of using the Terminal window is the return you get when something goes wrong. If you're using the GUI desktop to accomplish a task and something happens you generally get a one line description but if you're using the Terminal you will receive a more in-depth description of your problem. Yet another advantage to using the command-line Terminal is the universal element that giving commands holds over using a GUI. As you can see from even trying to locate the Terminal, the path to accomplishing a task with the GUI may vary when you're using Ubuntu, Kubuntu, Xubuntu etc. While Terminal commands aren't always the same in different distributions, you can issue the same commands for Ubuntu, Kubuntu, Edubuntu, Xubuntu and count on their effectiveness.

If you prefer to point and click instead of typing any commands into the Terminal you may find shelter under a few other Linux distributions like Mepis, Linspire and a few others. And also this all depends on what you use your computer for. If you play Solitaire and use the Internet to interact with your friends and that's it, it's possible you may never need the Terminal window on Ubuntu.

Lets take a look at some very simple commands on the Ubuntu desktop that will allow us to effectively accomplish some small tasks. After you've opened the Terminal window you can start typing in the commands. Below is a list of some useful commands and what they are used for.

  • sudo command – run command as root
  • apt-get - used to install, remove, upgrade and more.

Movement In The directory

  • cd - Change Directory
  • pwd - Print Working Directory


Managing Files and Text
  • cp - Copy
  • ls - List
  • mkdir - Make Directory
  • mv - Move
  • rm - Remove
  • grep - Search for Text Strings
  • head - Display Start of File
  • less - Display Part of File
  • more - Display Part of File
  • tail - View the End of a File

Managing System and Program Information

  • cal - Calendar
  • date - Date
  • fsck - File System Check


Managing Network Connections
  • chkconfig - Check Activated Services
  • ping - Test Network Connections
  • ftp - file Transfer Protocol
  • host - Check IP of Domain
  • ifconfig - Configure Network Devices
  • netstat - Display Routing Table
  • route - Set Routes
  • telnet - Connect to telnet
  • traceroute - Display Route


Manage Drives and Formats
  • mount - Mount a Drive
  • umount - Unmount Drive
  • fdisk - Format Disk
  • dd - Dupliate Disk
  • df - Disk Free Space


Managing Rights to Files and Directories
  • chmod - Change Mode
  • su - Switch User


Managing Users and Groups
  • passwd - Create Password
  • groupadd - Add a Group
  • groupmod - Modify a Group
  • chgrp - Change Group
  • groupdel - Delete Group