INDEX
SR PRACTICAL NAME DATE REMARKS
NO
1 Exercise on Baisc of Windows
2 Install of Linux Operating
System
3 Directory Management
Commands
4 General purpose command
on Linux
5 Using the simple filter
6 Communication Commands
7 Write a shell program that finds
a factorial of a number
8 Write a shell program that finds
weather a given number is prime
or not
9 Write a shell program that finds
the Average of three number
10 Write a shell program that will
convert all text of the file front
lowercase to uppercase
PRACTICAL - 1
Object – Exercise on Basic of Windows
Desktop
1. Open your computer and turn on the power.
2. After the computer completes the BOOT UP process, and your START SCREEN is full
of the Windows 8 TILES, bring up your desktop using the desktop tile and/or the
keyboard windows button.
Folders & Files
1. On the DESKTOP, right click and create a NEW FOLDER. Name the folder “ITE 115
E11N” (or your course number).
2. Open the new folder and create two NEW FOLDERS inside the ITE 115 E11N folder.
Name each folder as follows: ASSIGNMENTS & DUE DATES — COURSE PROJECT.
3. Download and save in the ASSIGNMENTS & DUE DATES folder, the assignment due
dates FILE from the assignments menu in Blackboard.
4. Download and save in the COURSE PROJECT folder, the course project FILE from the
assignments section in Blackboard.
Navigation
1. Return to the START SCREEN by clicking on your user name in the upper right corner,
select the LOCK choice to go to the LOCK SCREEN. Click or press on the screen to go
to the SIGN IN SCREEN, enter your sign on password, and to the START SCREEN
2. ZOOM in and out using the keyboard and mouse.
3. Navigate your returning to the desktop using HOT CORNERS, SCROLLING MOUSE,
SCROLL BARS, and BUMPING SIDES.
4. Sign out of the Windows 8 environment using the CHARMS BAR, and CONTROL –
ALT – DELETE keys on the keyboard.
Customization
1. Personalize the start screen using the charms bar and Change PC Settings.
2. Customize the tiles on the start screen using the mouse with press & drag.
3. Customize the Desktop with right click on an open area of the screen using the
Touch and Hold method.
PRACTICAL-2
Object – Install of linux Operating system.
How to Install Linux?
Linux is an open-source and free operating system to install, which allows anyone with
programming knowledge to modify and create their operating system as per their
requirements. Over many years, it has become more user-friendly and supports a lot of
features, such as
1. Reliable when used with servers
2. No need for antivirus
3. A Linux server can run nonstop with the boot for many years.
It has many distributions, such as Ubuntu, Fedora, Redhat, and Debian, but all run on top of
the Linux server. Installation of every distribution is similar; thus, we are explaining Ubuntu
here.
So let’s start using this wonderful operating system using the following methods.
A. Install Linux Using a CD-ROM or USB Stick
Download .iso or the ISO files on a computer from the internet and store them on the CD-
ROM or USB stick after making it bootable using Pen Drive Linux and UNetBootin.
1. Boot into the USB Stick
It would be best if you restarted your computer after attaching CD –ROM or pen drive to
the computer. Press enter at the time of boot, here select the CD-ROM or pen drive option
to start the other boot process. Try for a manual boot setting by holding the F12 key to
start the boot process. This will allow you to select from various boot options before
starting the system. You will get a list from which you must select all the options, whether
it is USB or CD ROM or a number of operating systems.
Set the keyboard layout.
Now you will be asked What apps would you like to install to start with Linux? The
two options are ‘Normal installation’ and ‘Minimal installation.’
2. Derive Selection
Select the drive for the installation of the OS to be completed. Select “Erase Disk and install
Ubuntu” if you want to replace the existing OS; otherwise, select the “Something else”
option and click INSTALL NOW.
3. Start the installation
A small panel will ask for confirmation. Click Continue in case you don’t want to
change any information provided. Select your location on the map and install Linux.
Provide the login details.
4. Complete the installation process
After the installation, you will see a prompt to restart the computer
You can also download drivers of your choice through the System Settings menu. Just
follow these steps:
Additional Drivers > select the graphics driver from the list.
Many useful drivers, such as Wi-Fi drivers, will be available on the list.
There are many other options also known to use and install Linux.
B. Install Linux Using Virtual Box VMWARE
In this way, nothing will affect your Windows operating system.
What Are Requirements?
Good internet connection
At least 4GB RAM
At least 12GB of free space
Steps:
1. Download the VIRTUAL BOX from the original ORACLE VIRTUAL BOX site.
Install Linux Using Virtual Box
Use the .iso file or ISO file that can be downloaded from the internet and start the virtual box.
You can also download drivers of your choice through the System Settings menu. Just
follow these steps:
Additional Drivers > select the graphics driver from the list.
Many useful drivers, such as Wi-Fi drivers, will be available on the list.
There are many other options also known to use and install Linux.
B. Install Linux Using Virtual Box VMWARE
In this way, nothing will affect your Windows operating system.
What Are Requirements?
Good internet connection
At least 4GB RAM
At least 12GB of free space
Steps:
2. Download the VIRTUAL BOX from the original ORACLE VIRTUAL BOX site.
Install Linux Using Virtual Box
Use the .iso file or ISO file that can be downloaded from the internet and start the virtual
box.
Here we need to allocate RAM to virtual OS. It should be 2 GB as per minimum requirement
Choose an option under Create a virtual disk.
Choose a type of storage on the physical hard disk. And choose the disk size(min 12 GB
as per requirement)
Click on Create option and then click on the START button to start the virtual box and
browse to the location of the .iso file of the OS.
Now Linux OS will start; click on the install option.
Select the drive for completing the OS installation. Select “Erase Disk and install Ubuntu”
if you want to replace the existing OS; otherwise, select the “Something else” option and
click INSTALL NOW.
Click on Continue.
Choose a username and password.
You are almost done. It should take 10-15 minutes to complete the installation.Once
the installation finishes, restart the system.
PRACTICAL - 3
Object –Directory Management Commands.
Generally, our terminal opens with the user's particular directory. To change directory to
home directory, execute the cd command as follows:
IS Command
The ls is the list command in Linux. It will show the full list or content of your directory.
Just type ls and press the enter key. The whole content will be shown.
lS<directory name>
CD Command
Linux cd command is used to change the current working directory ( i.e., in which the
current user is working). The "cd" stands for 'change directory.' It is one of the most
frequently used commands in the Linux terminal.
cd <dirname>
Mkdir Command
The mkdir stands for 'make directory'. With the help of mkdir command, you can create a
new directory wherever you want in your system. Just type "mkdir <dir name> , in place of
<dir name> type the name of new directory, you want to create and then press enter.
mkdir <dirname>
rmdir Command
This command is used to delete a directory. But will not be able to delete a directory
including a sub-directory. It means, a directory has to be empty to be deleted.
rmdir <dirname>
pwd Command
The pwd command writes to standard output the full path name of your current directory
(from the root directory). All directories are separated by a / (slash). The root directory is
represented by the first /, and the last directory named is your current directory .
. Pwd/home/username
PRACTICAL - 4
Object – General purpose command of linux
wc
The wc command displays the number of lines, words, and bytes in the chap1 file. The wc
command displays the number of bytes and words in each file that begins with chap . The
command also displays the total number of bytes and words in these files.
wc [OPTION]... [FILE]...
od
od command in Linux is used to convert the content of input in different formats with
octal format as the default format.This command is especially useful when debugging
Linux scripts for unwanted changes or characters. If more than one file is specified, od
command concatenates them in the listed order to form the input.
od [OPTION]... [FILE]...
IP
The ip command in Linux is a powerful tool that not only displays the current IP address of
a system but also allows you to view and manage the current configuration of network
interfaces, IP addresses, routes, and ARP tables.
IP<file name>
cal
The cal command displays a calendar of the specified year or month. The Year parameter
names the year for which you want a calendar.
cal [ [ Month ] Year ]
paste
Paste command is one of the useful commands in Unix or Linux operating system. It is
used to join files horizontally (parallel merging) by outputting lines consisting of lines
from each file specified, separated by tab as delimiter, to the standard outputpaste
[OPTION]... [FILES]...
Let us consider three files having name state, capital and number. state and capital file
contains 5 names of the Indian states and capitals respectively. number file contains 5
numbers.
$ cat state $ cat capital
Arunachal Pradesh Itanagar
Assam
Dispur
Paste number state capital
Arunachal Pradesh Itanagar
Assam
Dispur
sort Command
The sort command can help us to rearrange lines from standard input (stdin) or from a text
file.
sort [OPTION]... [FILE]...
Sunday Friday
Sort weaks
Monday Monday
Tuesday Saturday
Wednesday Sunday
Thursday Tuesday
Friday Wednesda
Saturday y
PRACTICAL-5
Object – Using the simple filter
Pr
The pr command is useful to convert the input data into the printable format with proper
column structure.
Code:
yum list installed | pr --columns 2 -l 40
Head
As the name suggested, we are able to filter / read the initial or top lines or row of data. By
default, it will read the first 10 lines or records of the give data. If we need to read the more
lines, then we need to specify the number of lines that we need to read with the help of “-n”
keyword.
Note: The record calculation will start from the top of the file or data.
Code:
head -n 7 file.txt
Tail
If we need to get the data from the bottom of the file then we will use the tail command. By
default, it will read the last 10 lines or records of the give data. If we need to read the more
lines, then we need to specify the number of lines that we need to read with the help of “-n”
keyword.
Code:
tail -n 3 file.txt
Mail Command
To specify the additional information with the mail command, use the -a option with the
command. Execute the command as follows:
mail -s"Subject" <recipient address>
Wall Command
Wall is a command-line utility that displays a message on the terminals of all logged-in
users. The messages can be either typed on the terminal or the contents of a
file. wall stands for write all, to send a message only to a specific user use
the write command.
The syntax for the wall command is as follows:
wall [OPTIONS] [<FILE>|<MESSAGE>]
Copy
If no file is specified wall reads the message from the standard input.
The most straightforward way to broadcast a message is to invoke the wall command with
the message as the argument:
PRACTICAL-6
Object – Communication Commands.
News Command
The news command writes system news items to standard output. This command keeps
you informed of news concerning the system. Each news item is contained in a separate
file in the /var/news directory.
news [-a|-n|-s]|[item...]
-a Display all news Item.
-n Report the names of the current news item
-s report the number of current news items without displaying their names or
contents.
Write Command
Allows two logged-in users to have an interactive chat session with each other. Consult the
mesg command to disable the ‘talk’ or ‘write’ command from writing to your terminal.
Must have ‘/etc/writesrv’ daemon running if you wish to have the ability to write to other
users.
Examples What it does
write roger Start a conversation with the user roger
write – tty22 Start a conversation with the person logged in on terminal 22
Whoami command
Displays user, group and privileges information for the user who is currently logged on to
the local system. If used without parameters, whoami displays the current domain and user
name.
whoami [option]
Who command
The Linux "who" command lets you display the users currently logged in to your UNIX or
Linux operating system. Whenever a user needs to know about how many users are using
or are logged-in into a particular Linux-based operating system, he/she can use the "who"
command to get that information.
Syntax : $who [options] [filename]
PRACTICAL-7
Object – Write a shell program that finds a factorial of a
number.
Algorithm
1. Get a number
2. Use for loop or while loop to compute the factorial by using the below formula
3. fact(n) = n * n-1 * n-2 * .. 1
4. Display the result
Program:
echo "Enter a number"
read num
fact=1
while [ $num -gt 1 ]
do
fact=$((fact * num)) #fact = fact * num
num=$((num - 1)) #num = num - 1
done
echo $fact
Output:-
Enter a number
Enter a number
24
PRACTICAL-8
Object - Write a shell program that finds weather a given
number is prime or not.
Prime Numbers: A prime number is a whole number greater than 1, which is only
divisible by 1 and itself. First few prime numbers are : 2 3 5 7 11 13 17 19 23 …..
echo "enter number"
read num
function prime
for(i=2; i<=num/2; i++)
do
if ((num%i)) -eq 0
then
echo "$num is not a prime number."
exit
fi
done
echo "$num is a prime number."
r=`prime $number`
echo "$r"
PRACTICAL-9
Object - Write a shell program that finds the Average of three
number.
# Shell Program to find Average of Three Numbers
clear
echo "Enter first number: "
read a
echo "Enter second number: "
read b
echo "Enter third number: "
read c
sum=`expr a + b + c`
avg=”sum / 3`”
echo "Sum = sum"
echo "Average = avg"
PRACTICAL-10
Object - Write a shell program that will convert all text of the file
from lowercase to uppercase.
echo "Menu "
echo "1. Lower to Upper"
echo "2. Upper to lower "
echo "3. Quit"
echo "Enter ur Choice \c"
read Choice
case"$Choice"in
1) echo "Enter File: \c"
read f1
if [ -f $f1 ]
then
echo "Converting Lower Case to Upper Case "
tr '[a-z]''[A-Z]' <$f1
else
echo "$f1 does not exist"
fi
;;
2) echo "Enter the File :\c"
read f1
if [ -f $f1 ]
then
2) echo "Enter the File :\c"
read f1
if [ -f $f1 ]
then
echo "Converting Upper case to Lower Case
to "
tr '[A-Z]''[a-z]' <$f1
else
echo "$f1 file does not exist "
fi
;;
3) echo "Exit......."
exit;;