You are on page 1of 17

Familiarizing to Linux and Windows

Tour of Linux OS (Ubuntu 12.04 or 14.04 distribution)


This is what a typical Ubuntu KDE Desktop looks like:

Unlike the Taskbar in Windows, Ubuntu has two panels (Top Panel and Left Panel).
Top Panel can be populated with completely customizable menus and buttons, including new menus, search
boxes, and icons, with the icons in particular (called launchers) performing functions similar to the
quicklaunch feature found in the Taskbar. The Left Panel contains access to everything.

Dash Home allows you to search for the various 'Applications' installed on the system. It also allows you to
access your 'Files and Folders'. It is similar to the Start Menu feature in Windows. Press the Start Button and
see for yourself.

All the system apps can also be accessed in Dash Home from the 'system category icon' shown at the
bottom. It is equivalent to the 'Control Panel' in Windows.

The 'File System' icon shown just below the Dash Home provides access to the various storage devices on
the system. It allows the user to access the directory structure.

Whenever you run an application, it's icon is added to the Left Panel, if not already present. The Left Panel
also provides quick access to various work-places. You can pin shortcuts to applications you frequently use
on the Left Panel. Initially, links like LibreOffice and Software Center are present there by default for quick
access.
The panels are highly reconfigurable: anything on these panels can be moved, removed, or configured in
other ways.

Installing Applications on Linux


There are 4 possible ways in which one can install applications, games, utilities, etc on a Linux OS:
(1.) The first and the easiest one being the Ubuntu Software Center. It lists the applications available on
online repositories and installs them on your selection. No hassles!

The steps are:

1. Click on the Software Center icon in the Left Panel or search for Software Center in Dash Home.
2. Choose the application-category you want to look into, or better yet, search for the application using
the search-box present in the top-right corner.

3. Click on the install button adjacent to the selected application.

4. You can also edit or delete or update the already installed utilities.

(2.) The second one, which is actually quite popular among the geeks, is the apt-get command. Fire up a
terminal from Dash Home or simply press the following key combination: <Ctrl> + <Alt> + <T>.

All the applications available in repositories can be installed from the Terminal using the following
command: sudo apt-get install <package_name>
For example: sudo apt-get install rar
This will download and install the application rar from the repository.

sudo apt-get install synaptic will install a GUI App for the apt-get command.

(3.) The third one is for installing applications available in the Debian Package (.deb) format. Just
download any .deb file, double click it, and rest will work like a charm. Nothing fancy.
E.g. Here's the link to a number guessing game called '4digits':
http://ftp.tw.debian.org/debian/pool/main/4/4digits/4digits_1.1.2-1_amd64.deb
Try installing it yourself and see what happens.
(Hint: If the software is already installed, try uninstalling it using the Ubuntu Software Center and then
reinstall it again.)
Problem: *Are there any other ways to install Debian Packages (probably using the terminal)?

(4.) The last one is for installing softwares from compressed archives (.tar.gz format).
Here's the link to an anagram guessing game called 'pynagram':
http://launchpad.net/pynagram/0.4/0.4.1/%2Bdownload/pynagram-0.4.1.tar.gz
Steps for installing it:
1. Download it and open up a terminal <Ctrl> + <Alt> + <T>.
2. Go to the Downloads folder: cd ~/Download
(Note: What does the command cd ~ do?)
3. Extract(decompress) the archive: tar -xvf pynagram-0.4.1.tar.gz
4. Go inside the decompressed folder: cd pynagram-0.4.1
5. You'll see a setup.py file here, now we're going to install the game: ./setup.py install -v
6. And, finally, run the game: ./bin/pynagram

Linux basic commands


There are some basic Linux commands that we will practice in the Linux terminal.
(Note: Within a command, < > implies 'compulsory arguments', [] implies 'optional arguments'.)
pwd Shows the name of current/working directory
mkdir Used as mkdir <dir-name>, Used to create directories
e.g. mkdir iiit-delhi will create a directory named 'iiitd-delhi'.
rmdir Used as rmdir <dir-name>, Used to remove empty directories
e.g. rmdir iiit-delhi will delete the 'iiitd-delhi' directory.
cd Used as cd <directory>, Used to change directories
e.g. cd iiit-delhi will take you inside the 'iiitd-delhi' directory.
cd .. will take you to the parent directory.
cd ~ will take you to the parent directory.
cd . will take you to the current directory.
(Single dot '.' points to the current directory. Double dot '..' points to the parent directory. The two pointers
are present in every directory.)

paths Most of the basic commands usually require some path information as an input. There are two
types of paths :
Absolute path: It is specified from the root ('/') i.e. the starting point of the file system:
E.g. /home/arjun/photos/diwali/ is the absolute path for the for the diwali folder which resides in the
photo folder of the (user) arjun folder. This resides in the home directory which finally is in the / i.e.
the root directory itself.
(Note: Absolute paths work in all situations.)
Relative path: It is specified from the current directory:
For example, if you are in the photos directory currently and you want to move to the diwali directory,
you can simply use cd diwali instead of using /home/arjun/photos/diwali/. Similarly, to go back to the
'photos' directory from the 'diwali' (current) folder, just run cd ..

mv Used as mv <source-file-path> <dest-file-path>, Used to move (rename) files


e.g. mv ~/Downloads/apple.txt ~/Documents/banana.txt
This will cut the file 'apple.txt' from the Downloads folder and paste it in the Documents folder by the name
'banana.txt'.
rm Used as rm <file-name>, Used to remove files or directories
e.g. rm apple.txt
This will delete the 'apple.txt' file in the current folder.

ls Used to list all directory contents

ll Used to list all directory contents in a long listing format

w Shows who is logged on and what they are doing


whoami It shows the logged in userid

man Used as man <command>, It is a reference manual to any command we use:

For example, try running the following commands in the terminal:


man mkdir
man pwd
man tar
Try looking into the man (manual) pages of the commands you have practiced until now. You will find out
that a command has the following general syntax:
<command_name> -[options] <arguments> [arguments]
where options (preceded by a hyphen '-') are used to modify the original behavior of the command.
Try looking into the options available with commands you have practiced till now and look into the manner
you can modify their behavior, especially, look into the tar command.

Linux Utilities
Like the Task Manager and Sysinternals in Windows, we have a few utilities in Linux too. All these have
GUI versions too, but we will execute them in Terminal.
top: The top program provides a dynamic real-time view of a running system. It can display system
summary information as well as a list of tasks currently being managed by Linux. It is similar to Task
Manager and Process Explorer in Windows.

vmstat It reports virtual memory statistics. It reports processes, memory, paging, block I/O, traps, and
CPU activities.

ps - It displays information about a selection of the active processes.

free It displays the total amount of free and used physical and swap memory in the system, as well as the
buffers used by the kernel.

netstat It shows network statistics

Schedule a task
Like the Task Scheduler in Windows, we can also schedule tasks in Linux. You just have to put a file with
the extension '.crontab' (a Cron Table file) in your home directory containing a line in the following format:
<minute> <hour> <day of month> <month> <day of week> <command>
e.g.: 45 11 * * 4 touch bingo.txt
This will create a file named 'bingo.txt' in your home folder every Thursday at 11:45 HRS (if it is not already
there). To make it work, you'll have to run the following command after saving the '.crontab' file:
crontab ~/*.crontab
Exercise: Schedule a weekly backup of your Documents folder. (Hint: Use the Crontab Scheduler and the
Tar command.)

Process and open/used files details


All process details can be accessed from opening the directory /proc/<pid>
To do this execute the following in Terminal:
cd /proc/
ls
cd <pid>
ls

What Happens During Linux Program Installation?


Common operations performed by the installer/ package manager during software installations include:

Making sure that necessary system requirements are met, this includes both hardware and software

requirements. Before installation, installer ensures that all software dependencies are satisfied
Checking for existing versions of the software
Creating or updating program files and folders
Adding configuration data such as configuration files, or setting environment variables
Making the software accessible to the user, for instance by creating links, shortcuts or bookmarks
Configuring components that run automatically, such as daemons
Performing product activation (if required)
Updating the software versions

Almost all Linux systems follow FHS (Filesystem Hierarchy Standard) which is a directory structure
standard for Unix or Unix-like OSs. In the FHS all files and directories appear under the root directory "/",
even if they are stored on different physical or virtual devices. Note however, that some of these directories
may or may not be present on a Unix system.
Commonly preferred installation directories are /usr/bin/ or /usr/local/bin/
Configuration files generally go to /etc/

FOR WINDOWS HOW-TOS CHECK OUT THE GNOME HANDOUT


{Multiple installations can go simultaneously, but only single program can be uninstalled at a time}

What Happens During Windows Program Installation?


Most programs come with an installation program named Setup.exe or Install.exe. When you install a
program, the installation program usually does the following:

Looks for a previous version of the program on your hard disk. If it finds a previous version, the
program may ask whether you want to replace the previous version.

Creates a folder in which to store the program files. Most installation programs ask where you'd like
this folder. Some installation programs also create additional folders within this folder. Windows
creates a folder named Program Files, usually in C:\ (If Windows is stored in a partition or drive
other than C, the Program Files folder is usually in the same partition).

Copies the files onto your hard disk. If the program files are compressed, the installation program
decompresses them. Usually, the installation program copies most of the files into the program's
folder, but it may also put some files into your C:\Windows, C:\Windows\System, or other folders.

Checks your system for the files and hardware it needs to run. For example, an Internet connection
program might check for a modem.

Adds entries to the Windows Registry to tell Windows which types of files the program works with,
which files the program is stored in, and other information about the program.

Adds a command for the program to your Start | All Programs menu (some programs add submenus
to the Start | All Programs menu to contain several commands). The installation program may also
add a shortcut to your Windows desktop to make running the program easy for you. You can change
the position on the Start menu of the command for the program, get rid of the command, or create a
command if the installation program doesn't make one. You can also create a shortcut icon on the
desktop, if the installation program hasn't done so, or move or delete the program's shortcut.

Asks you a series of questions to configure the program for your system. The program may ask you
to type additional information, like Internet addresses, passwords, or software license numbers. It
may also ask which users should be able to run the program.

Every installation program is different, because it comes with the application program, not with
Windows. If your computer is connected to a LAN or to the Internet, the installation program may
configure your program to connect to other computers on the network.

What Happens During Program Uninstallation?


The perfect uninstallation program exactly undoes all the actions of the installation program, removing all
the files and folders the installation program created, and putting back everything else to where it was
originally. Unfortunately, we've never seen a perfect uninstallation program, but most uninstallation
programs do an acceptable job of removing most traces of a program from your system.

You might also like