Using the terminal window is often frightening for new Linux users. This fear stands in the way of effectively using Linux desktop to its fullest potential. But, this guide will make you more comfortable with the command line, and allow you to get the most from you Ubuntu system.
Introduction
Many users have been using point and click methods of desktop navigation since MS Windows in the 1980s. The idea of typing text into a command line window is a bit overwhelming for the average computer user, however, once you learn the basics, it's just as easy as the familiar point and click. Today we'll be using the Ubuntu 8.04 desktop, which is available for download here.
Quick and Simple
The advantages of using the command-line terminal to accomplish tasks are endless. Using the terminal allows you to perform any task in a fraction of the time that it takes to accomplish the same task graphically.
Try installing a package using the synaptic package manager. That requires at least six clicks of the mouse, and typing the root password once.
Or you could use the terminal by clicking 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.
Your package will be downloaded and installed from the terminal window.
Consistency
From the above, 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 Graphical User Interface (GUI) desktop to accomplish a task and something happens you generally get a one line description, but if you're using the terminal window, 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 trying to locate the terminal window, 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 all versions of 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 this also 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.
Getting Started
Let's take a look at some very simple commands on the Ubuntu 8.04 Hardy Heron 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 a new Directory/folder
mv - Move
rm - Remove
grep - Search for Text Strings
head - Display Start of File
less - Display Part of File, a more sophisticated version of more ("less is more"). It can scroll backwards and has more options than more.
more - Display Part of File in a termial, there is no need to start up an editor or word processor
tail - View the End of a File
Managing System and Program Information
cal - Calendar
date - Date
Troubleshooting
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 - Duplicate 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
Continued
Part 2 will be coming soon, but for now I hope the above information allows you to start to explore the Ubuntu Terminal.
Beginners Guide To Ubuntu Terminal
New Linux users are often intimidated by the idea of typing commands into the terminal window. This guide will teach you the most important commands so you can get use your Ubuntu Linux system to its fullest potential.
- 1. The Beginner's Guide to the Ubuntu Terminal - Part 1