You are on page 1of 5

ASSIGNMENT NO .

1
CSE 207

SUBMITTED BY :-

Ambuj Jain
B – 49
K1901
1. Design a new panel on GNOME desktop by adding given features:

i) Add a clock, window selector on this panel

ii)Change the background of panel and its font

iii) Create a launcher for GNOME editor.

ANS :-

i> To add a panel, right-click on panel, then choose New Panel(clock,window selector). The
clock and window selector is added to the GNOME Desktop. These new panel contains
no objects. You can customize the new panel to suit your prefererence.

ii> Right click on panel then choose ` edit panel ‘ , choose whatever you want .

iii> Open a menu that contains the launcher. Drag the launcher on to the panel. OR right
click on panel then click add launcher, and choose the program you want .

2. a) Suppose you want to make your system dual bootable in Linux, which boot
loader will you prefer and why?

ANS > GRUB is dynamically configurable. It loads its configuration at startup, allowing boot-time changes
such as selecting different kernels or initial RAM disks. To this end, GRUB provides a simple, bash-like,
command line interface which lets users write new boot sequences.

GRUB is highly portable. It supports multiple executable formats, and is geometry translation independent.
Although Multiboot compliant, GRUB supports non-multiboot operating systems such as Microsoft Windows
and OS/2 via chain loading. GRUB supports all commonly used Unix file systems, VFAT and NTFS used by
Windows, as well as Logical Block Address (LBA) mode. GRUB allows users to view the contents of files on
any supported file system.

GRUB can be used with a variety of different user interfaces. Most Linux distributions take advantage of
GRUB's support for a graphical interface to provide a customized boot menu with a background image, and
occasionally mouse support. GRUB's text interface can be set to use a serial link to provide a remote terminal
boot loader access.

b) Which one is better, installing windows over Linux or installing Linux over
windows? Find out the possible errors for both the scenarios?

ANS > Installing Linux over windows is better than vice versa because windows provide good
platform to install any OS over it.

If we install windows over linux many chances of lose of data occurs .And also it uses different
kind of directory system ,so it very difficult to install windows over linux.
3-) Give command to perform the following:

a. Create a directory tree under Home directory

ANS > mkdir –p /abc/xyz

b. Display current working directory.

ANS > pwd

c. Display the name of user's Home directory using environment variables

Ans- echo $HOME

d. Allow all group users to modify the contents of ABC.txt file

ANS > chmod g +w abc.txt

e. Revoke read execution rights from all users on ABC program

ANS > chmod u -rx ABC

PART-B
4-) Write all the steps to write, compile and execute a shell script in Linux
environment using a program to find largest of 3 numbers?

ANS .

echo ENTER THREE NUMBERS

read a b c

if [ $a –gt $b –a $a –gt $c ]

then

echo $a is the largest .

elif [ $b –gt $a –a $b –gt $c ]

then

echo $b is the largest .

else

echo $c is the largest


fi

5. a) Write down the syntax to change the command line prompt in shell from $ to
%

b) Write down the syntax to create a shell variable of your own.

Ans a) PS1=”$”

PS1=”%”

Ans b) #! /bin/bash

a=2

here `a’ is the new shell variable.

6)- a) Write the shell command to create a user with name student whose primary
group is college, set its expiry date to 18 Oct, 2010 and make him a part of
additional groups study, research.

b) Write the shell command to change the group name from staff to teaching.?

Ans

a) useradd -g college -G study,research –e [ 2010-10-18 ]

b) groupmod –n staff teaching

7-) . If a 5 digit number is input through keyboard, write a shell script to calculate the
sum of its digits.

Ans –

echo ENTER THE NUMBER

read x

sum=0

i=0

while [ $x –gt 0 ]

do

j=`expr $x % 10
x=` expr $x /10`

sum=`expr $sum + j`

done

echo SUM OF THE DIGITS IS $sum

You might also like