Section – a 2 Marks Questions


Lprm parameters Description



Download 495.38 Kb.
Page6/8
Date09.01.2017
Size495.38 Kb.
#8152
1   2   3   4   5   6   7   8

Lprm parameters Description

-p printername Specifies the printer from which the print job should b removed

- Removes all jobs that the user owns from the specified printer number Removes job number from the queue.

The syntax for removing the print job is;

[root@GP /root] # lprm –p Epson 300+ 17

Q10. Explain the mail preferences available in Linux.

Ans. mail: - To read the email there is a tool available in linux i.e. mail. To run this simply type this command on the shell prompt like so;

[root@gp /root]# mail

This will display the available email for you that we can read. This tool does not require any screen formatting, it is well suited for those instances where are troubleshooting a host so broken it has no terminal control. To exit mail program type q and press enter.

pine: - is another tool which actually takes control of your terminal window and make the display look much nicer. Being a fully menu driven programme where all of your options are always listed on a menu in front of you. Pine is ideal for communicating with people who use all sorts of other mail tool since it understands the entire popular standard in use today.

mutt:- mutt is another tool which offers a wealth of capability. Unlike pine mutt is less menu oriented. The main advantage of mutt is that it offers excellent memory management and can handle large mailboxes.

Q11. How you can install Local printer from the Desktop?

Ans. To install the printer from the desktop use the printconf-gui tool. This tool enables you to add, delete and edit printers. It also has features that enable you to send test pages to those printers to make sure they are working properly. With this you can add a printer that is directly connected to your computer or to another computer on the network. To add a printer with the printerconf-gui tool follows these steps.

1. To open the Printerconf-gui tool type the following as root user in the terminal window.



[root|@GP /root] # printerconf-gui &

The printerconf-gui window appear.

2. Click new. An add a new print queue window appear.

3. Click next. The window that appear ask you to add a printer type and the name of printer.

4. Add the following information.

(a) Queue Name:- Add the name of you want to give to identify the printer. The name must begin with letter but after the initial letter.

(b) Queue Type: - Select local printer if the printer is connected directly to the

parallel port or serial port on you computer.

The configure a local printer screen appear and displaying a list of devices on which the printer were found.

1. Select your printer from the list of devices found and clicks next.

2. Click the arrow next to the manufacturer of you printer, select the model of printer you are using and then click next.

3. Click finish to create the entry for your printer. The printer will appear in the in the main printconf.gui window.

4. Choose file, save changes to save the changes.

5. After the printer get installed check that the printer is working properly or not. For that first restart the lpd deamon by choosing file > Restart lpd.

6. Click on next and select the printer name in the printconf-gui window, click test and slelect one of the following.

US letter PostScript Testpage

ASCII Text Testpage

A4 Postscript Testpage

Printing should b working fine at this point. If it isn’t, and you get an error like as device is busy then we need to restart the Linux system.

Q12. How a Printer is installed in LINUX.

Ans. To Install a Printer Use following Steps,

1. Connect to the CUPS interface on http://localhost:631, assuming that you are on the local computer.

2. Click the Printer button

3. Click the add Printer Button.

4. Fill in the information for that printer, such as its name, location, and description.

5. Set the device of the printer. If it is a USB printer, typically the device will be /dev/usb/lp0. If you have a printer connected directly to the computer via a printer cable, the device will be /dev/lp0.

6. Select the model driver for you printer.

7. When you are done click the printer button again.

8. Select print test page to test your printing configuration.

Q13. What is the CRON program? Also write down the function of crontab File.

Ans. CRON: - The CRON services allow you to schedule events to take place at certain date and time which is great for periodic events like backups and email remainders. Using CRON is an extremely efficient way to automate your system, generate reports on a regular basis and perform other periodic works. CRON is started by the boot scripts and is already configured for you. The cron service works by waking up once in a minute and checking each user crontab file. All the configuration files on which it relies are handled via the crontab file.

The crontab File: - This is the tool, which allows you to edit entries to be executed by crond and crontab. It verifies your permission to modify your cron settings and then invoke a text editor so you can make your changes. Once you have done crontab places the file in the right location and bring you back to a prompt. The file listing your cronjobs is formatted as follows. All values must be listed as integer.

Minute Hour Day Month Dayofweek Command

Q14. What are rc scripts? How you can write your own rc Script.

Ans. Scripts are responsible for starting and stopping the services that are particular in runlevel. Because of number of services that need to manage, rc scripts are used. The main /etc/rc.d/rc, is responsible for calling the appropriate scripts in the correct order for each runlevel. For each runlevel a subdirectory exists in the /etc/rc.d directory. These runlevel subdirectories follow the naming scheme of rcX.d, where X is the runlevel.

Writing your own Scripts: - There are two methods of writing or editing the startup and shutting down scripts. We can select any one of them.

1. If your change is to be affected at boot time only, and the change is small you may want to simply edit the /etc/rc.d/rc.local script. This scripts gets run at the very end of the boot process.

2. Other hand if your addition is more elaborate and / or requires that the shutdown

process explicitly stops, then you should add a script to the /etc/rc.d/init.d directory.

This script should take the parameters to start and stop and action accordingly.

The first option is much easier than second one. To make addition to /etc/rc.d/rc.local simply open any editor of your choice and append the commands you want to run at the end.



Q15. What is the difference between Windows 2000 and Linux?

Ans. The difference between windows 2000 and Linux are given below.
Q16. Write down the steps for configuring quota settings in Linux.

Ans. Creating, modifying and removing quotas on either a per-user or per-group basis is done via the edquota command. The following steps must be followed before configuring disk quota.

1. Soft Limit: - This limit is placed on a user or group. In this if the user account exceed the soft limit a grace period can be imposed as to how long the account can exist over the soft limit. During this time phase users can be warned that their account are over the limit.

2. Hard Limit: - This limit is imposed by the Operating system and cannot be overrun. Any attempts to write beyond the limits are denied.

3. Grace Period (Time limit): - When a user account exceeds the soft limit, a clock starts tracking. After the grace period expires the user cannot access the account. The length of this grace period should depend on the environment. A common value is one week. The edquota command has only three options when used to manage per-user quotas.

-u login Sets the quota information for the named user.

-t Sets the grace period of a partition.

-g group Sets the quota information for the named group.

-p login Allows you to clone one user’s information to another user.

To place a quota on user GP, we will issue the following command;

[root@ptu] # edquota –u GP

This command will bring up the editor with a file.



Q17. Write Down a short on fsck and e2fsck.

Ans. fsck: - Stands for file system check. This tool automatically runs on every boot. It works similar to windows scandisk. It checks and repair any damage on the file system before continuing the boot process. If you shut down the system in the proper manner, fsck will run without any incident. But if you had to perform a hard shutdown, fsck will need to run through all of the local disks listed in the /etc/fstab file and check them. So the fsck tool is used to diagnose and repair file systems that may become damaged in the course of daily operations. Such repairs are usually necessary after a system crash in which the system did not get a chance to fully flush all of its internal buffers to disk.

e2fsck: - The fsck tool is not the proper title for the ext2 repair tool; its actually just a wrapper. The fsck wrapper tries to determine what kind of file system needs to be repaired and then runs the appropriate repair tool, passing any parameter passed to fsck. In ext2 the real tool is called e2fsck. When a system crash is occurred we need to call e2fsck directly rather than relying on other applications to call it for you automatically.

Q18. How you can Query a package?

Ans. Querying the database of installed packages is accomplished with rpm -q. A simple use of rpm -q foo, is that, it will print the package name, version, and release number of the installed package foo:

[root@GP /root] # rpm -q foo

foo-2.0-1

[root@GP /root] #

Instead of specifying the package name, you can use the following options with –q to specify the package(s) you want to query. These are called Package Specification Options.

-a queries all currently installed packages.

-f will query the package owning .

-p
queries the package
.

There are a number of ways to specify what information to display about queried packages. The following options are used to select the type of information for which you are searching.

These are called Information Selection Options.

-i :- Displays package information including name, description, release, size, build date, install date, vendor, and other miscellaneous information.

-l: - Displays the list of files that the package contains.

-s: - Displays the state of all the files in the package.

-d: - Displays a list of files marked as documentation (man pages, info pages, README’s, etc).

-c: - Displays a list of files marked as configuration files. These are the files you change after installation to adapt the package to your system (sendmail.cf, passwd, inittab, etc).

Q19. Discuss the evolution of operating system. How many types of operating systems are there?

Ans. 1) Simple Batch System: It had a single processor, ran a single program at a time

and interacts with single user at a time. To speed up processing, jobs with similar needs were batched together and were run through the computer as a group. Thus the programmers would leave their programs into batches with similar requirements and, as the computer became available, would run each batch. The output from each job would be sent back to the appropriate programmers. Memory layout for a simple batch system



2) Batch Processing System: In batch processing programs, data and system commands are submitted to computer in the form of a job. It takes several jobs in a queue and automatically keeps executing one job to next job in the queue. There may be little or no interaction between the user and executing program. The batch monitor does all the functions of the batch processing system. Batch monitor is permanently stored in the lower part of the memory and the rest part of memory is left for the execution of current job.

3) Multiprogramming Operating System: When more than one program is executing in the system then it is called multiprogramming. The operating system that supports more than one program to execute simultaneously is called multiprogramming operating system. Multitasking or multiprogramming operating system supports concurrent execution of two or more programs (at the same time).

Multiprogramming increases CPU utilization by organizing jobs in several ways so that the CPU always has one job to execute. The idea behind this is -- As the operating system keeps several jobs in the memory at a time, some jobs are kept in the job queue. The operating system picks and executes one of the jobs. This job may have to wait for some task, then operating system switches to and executes another job. When that job needs to wait, the CPU switches to another job and so on. When first job finishes waiting then it gets CPU back. Hence there is always some job to execute, so CPU will never sit idle.



4) Time Sharing System: A time-shared operating system allows many users to share the computer simultaneously. As each process in the time-shared system is very short so only little CPU time is needed for each user. As the system switches rapidly from one user to another the user thinks that he is the only user working in the system whereas actually many users share the computer. Time-sharing system sets the time for every process. Therefore it requires round robin scheduling. In this, if time of one job is computed but job is not finished so this job is placed at the end of queue of waiting program.

5) Parallel System: Most systems today are single processor systems, that means they have only one main CPU.A system containing more than one processor is ultiprocessor system. Today, most of the systems want to become multiprocessor system. Such systems have more than one processor in close communication, sharing the computer bus, the clock and sometimes memory and peripheral devices. These systems are referred to as tightly coupled system.

6) Distributed System: A recent trend in computer system is to distribute computation among several processors. In this scheme the processors do not share memory or clock, instead every processor has its own memory. The processors can communicate with one another through various communication lines. These systems are usually referred to as loosely coupled systems or distributed systems. The processors in this scheme are referred to by a number of different names like sites, nodes, computers and so on.

7) Real Time System: Real time operating system is used in an environment where a large number of events, must be accepted and processed in a short time. Such application includes telephone switching equipment, flight control and real time simulation.
Q20. Explain Fdisk command under Linux?

Ans. fdisk is a menu driven program for creation and manipulation of partition tables. It understands DOS type partition tables and BSD or SUN type disklabels. The device is usually one of the following:

/dev/hda

/dev/hdb


/dev/sda

/dev/sdb


A device name refers to the entire disk. The partition is a device name followed by a partition number.

For example, /dev/hda1 is the first partition on the first IDE hard disk in the system. Disks can have up to 15 partitions. To execute this command simply type the following command on command prompt



[root@gp /root]# fdisk /dev/had

command(m for help):

The basic fdisk commands are:

p print the partition table

n create a new partition

d delete a partition

q quit without saving changes

w write the new partition table and exit

m print the menu

Changes we make to the partition table do not take effect until we issue the write (w) command. After creating the partition we must reboot the system to activate the created partitions.



Q21. Write down the steps for installation of linux network printer.

Ans. Before trying to get a network printer to work, make sure it works locally. After this we have to check our network setup. It will be easier for everyone involved if your printer server has a static ip instead of DHCP. This can be done using Slackware's netconfig tool (be sure to restart inet1 to put your changes into effect--this is done by typing: /etc/rc.d/rc.inet1 restart).

Once your printer is setup and your ip is static, go on to Step 1.

Step 1:

WARNING: When editing conf files, always make a backup before making changes. This can be done with the following command;



root# cp /etc/cups/cupsd.conf /etc/cups/cupsd.conf.backup

Once your backup is created, open the cupsd.conf file using your favorite text editor (vi, nano, emacs, etc.):



root# nano /etc/cups/cupsd.conf

We will make some small modifications to this file. First and foremost, look for the line that looks something like this: Code:



#ServerName myhost.domain.com

If it isn't there, add it!

Note the #. Delete this to uncomment the line. You may either put in your hostname or the static ip address you assigned earlier. The line should look like this:

Code:


ServerName 192.168.1.5

Note: For simplicity sake, I personally chose ip address (if you couldn't already tell!). That way if I modify my hostname or anything, the ip can stay the same.

The second adjustment you will make is to the line that looks like this(once again if it isn't there, add it):

Code:


#BrowseAddress x.y.z.255

#BrowseAddress x.y.255.255

#BrowseAddress x.255.255.255

#BrowseAddress 255.255.255.255

#BrowseAddress @LOCAL

#BrowseAddress @IF(name)

You can uncomment one of these lines or just add your own. It needs to look like this:

Code:

BrowseAddress 192.168.1.255

This will broadcast this address for your entire network. Adjust the 255 to whatever your netmask is. Finally look for this section of the cupsd.conf file:

Code:



Order Deny, Allow

Deny From All

Allow From 127.0.0.1

Create a new line after Allow From 127.0.0.1 and add the ip addresses or ranges for your network. The section should look like this when you are done(the new line is in red): Code:





Order Deny, Allow

Deny From All

Allow From 127.0.0.1

Allow From 192.168.1.*

You should adjust this line according to your network address setup. Save the file and

restart the cups server.

Code:


root#/et1c/rc.d/rc/cups restart

If the server restarts, you are ready to go on to Step 2.

If you get an error, make sure that you typed in all of your ip addresses correctly.

Step 2 : Setting Up the Client

Your server is ready to roll, so now it's time to set up your client machine. In order for your client to communicate with the server, the client needs to be running the cups daemon. Install cups and any other driver libraries that you needed on the server. In the above example, it was cups and gimp-print. Start cups:

Code:

root#/etc/rc.d.rc.cups start

You need to have cups running to access the network printer. You don't need to do anything with the cupsd.conf though, so once the daemon is started, move on to Step 3.



Step 3: Introducing Your Client to Your Server

On the client, open up your web browser and access localhost:631. Login in using root and root's password. Click on manage printers. If your network printer shows up, you are done and ready to go. If it doesn't, keep going!

Click on administration and add printer.

1. Fill in the name of the printer.

2. Under location, I type in the ip address of the server.

3. You can fill in a description, but you don't have to.

4. Click on continues.

The next page comes up called Device with a drop down list. Select Internet Printing Protocol (ipp) and click continue. Now we need to tell cups the network location of your print server. To do this, we will need the server's ip address, and the name of our printer as cups sees it. This is the format:



ipp://server_ip_address/printer/printer_name

Change the ip address and printer name accordingly. Your entry should look like:

Code:

ipp://192.168.1.5/printer/EpsonPrinter

Click continues.

Choose the correct printer, click continue, choose the correct driver, and click continue again. Be sure to configure the printer so that the driver knows what is the size of paper and print quality to use.

Finally, click print test page.




Q22. How does LinuxConf help in user management?

OR

What are various tasks that are performed by LinuxConf package?

Ans. Adding a User Account

Adding a user is one of the most basic tasks you will encounter in administering your system.



To add a user:

  1. Open Config => Users accounts =>

Normal => User accounts. Linuxconf may show you a filter screen.

  1. Filter Screen: - We can use the filter

screen to select a smaller range of accounts than the full list. To get the full list, select Accept without changing any of the parameters. For detailed information on the various filters, select the Help button on the Filter control screen. Once you've applied or bypassed the filter, you'll see the Users accounts tab We can control the filter using Control => Features. You'll see the Features tab, which allows you to set the Trigger for filter parameter, Filter Control Screen

3. Users Accounts Screen: - Select Add. This will open the User account creation tab.

The User account creation screen includes the Base info, Params and Privileges sections. Only the Login name is required.


  1. User Account Creation Base info for User Accounts The Login name is the name of

the account and is usually all lowercase letters. First or last names, initials or some combination thereof are fairly common login names. Since Red Hat Linux uses the User Private Group scheme, each user will be assigned to a default group consisting only of the user. In the Supplementary

groups field, you can specify additional groups. Group names should be separated by spaces. The default for this field is blank, meaning no supplementary groups are specified. The Home directory specifies the home or login directory for the account. The default is /home/login, where login is replaced by the login name. A home directory is your starting point in the directory structure when you log in, or if in X, for each Xterm window opened. This is also where account specific preference files are stored. The Command interpreter is the default shell for the account. The bash shell is the default shell for Red Hat Linux. The User ID (UID) is the number associated with each user account. This is automatically generated by the system when the account is created, so just leave this field blank. The system uses the UID to identify an account.



5. Params for User Accounts:

The Params are used for password and account management. By default, all of the settings are ignored, so they are unused. Must keep # days sets a minimum number of days for a user's password. The Must change after # days field can be set to make a user's password expire after a certain number of days. If you want to warn them that the password is going to expire (a good idea), the Warn # days before expiration field should be used. If you'd like to have their account set to expire after a certain number of days, use the Account expire after # days field. You could alternatively set Expiration date.



  1. Privileges for User Accounts: In the Privileges section, you can grant access and/or control over various aspects of system configuration. As a default, regular users are denied all privileges on this screen. We can grant the privilege of activating changes to a user. In that case, the user will be able to activate any changed system configuration parameters in Linuxconf.

  2. Creating Passwords: A simple technique for creating a password is to use the first

letters from each word of a phrase that is familiar to you (a line from a favorite song might be appropriate). Make a few letters uppercase, and insert a few numbers and/or special characters in place of letters. Press the Accept button again when finished.

Q23. Explain the following Networking tools in details?

1) telnet

2) rsh

3) remote X displays

Ans. The most using networking tools are telnet, rsh, remote X, and ftp.

1. telnet : - Linux can understands the concept of multiple users logged in to the same workstation at the same time. So in order to allow for someone to log in to another host from remote, the telnet command was created. The format of the command is as follows:



[root@gp /root]$ telnet PTU

where PTU is the name of another computer running either Linux or a variant of UNIX. Once you run the command, you will get a login prompt from that machine. Logging in to that machine enables you to run programs on the other host just as if you were running them on your own. If you aren’t sure where you are logged in, use the uname command to find out where you are. Due to security concerns, telnet has fallen out of favor as a method for logging in to remote machines however, because of its ability to send and receive ASCII text over a network port, telnet is still very useful as a diagnostic tool.

2. Remote Shell: rsh: - In telnet, we must enter a username and password in order to log in to another host. For those people who want that they log on to the other host automatically and trust them. So that when we issued a remote login request, the system would allow them access without asking for a login and password. The double-win with a feature like that is the ability to automate tasks that require one host to invoke a program on another host. To accommodate this, the rsh command was created. In its simplest form, specify the name of the host you wish to log in to the way you would for telnet. For example:

[Root@gp /root]$ rsh PTU

3. Remote X Displays: - This makes it possible to log in to a server that has a special program on it and have the display redirected to the screen in front of you. Allowing this to happen is a twostep process. The first step is telling your machine that it should allow connections from another host for X displays. This is done with the xhost command:

[root@GP /root]$ xhost +PTU

where PTU is the name of the host you want to allow X displays to come from in addition to your own host. Now that you have allowed PTU to display to your host, log in to PTU, and set your DISPLAY environment variable like so:

[root@GP /root]$ DISPLAY="PTU1:0"; export DISPLAY

This will redirect all X displays to the host workbox. If you have two hosts to try this with, an easy test to see if it worked is to start a web browser on the remote host and watch it display its content on your host. Once you are done with whatever work is required to allow other hosts to display to your screen, you need to explicitly disallow future connections like so:

[root@GP /root]$ xhost -PTU

If you want to disallow everyone, you can use the following shortcut:

[root@GP /root]$ xhost –

Q24. Explain the following editors in details.

1) vi

2) emacs

3) joe

4) pico

Ans. 1. Vi : - Vim stands for "Vi IMproved". It used to be "Vi IMitation", but there are so

many improvements that a name change was appropriate. Vim is a text editor, which includes almost all the commands from the UNIX, programs vi and a lot of new ones. Commands in the vi editor are entered using only the keyboard, which has the advantage that you can keep your fingers on the keyboard and your eyes on the screen, rather than moving your arm repeatedly to the mouse. The version of vi that ships with Linux distributions is VIM (VI improved). It has a lot of features that made vi popular in the first place (including a graphical interface if X is running).

To start vi, simply type

[root@GP /root]# vi

2. emacs: - It has been argued that emacs is an operating system all by itself. It’s big, feature-rich, expandable, programmable, and all-around amazing. On its cover, it works like Notepad in terms of its interface. To start emacs, simply type

[root@GP /root]# emacs

Once emacs has started, you can visit the psychiatrist by pressing ALT-X and then typing doctor. To get help using emacs, press CTRL-H. If you want to save a file press CTRL-X and then CTRL-S. To exit emacs, use CTRL-X followed by CTRL-C.



3. Joe: - This editor most closely resembles a simple text editor. It works much like Notepad and offers on-screen help. Anyone who remembers the original WordStar command set will be pleasantly surprised to see that all those brain cells hanging on to CTRL-K commands can be put back to use with joe.

To start joe, simply type



[root@GP /root]# joe

4. pico : - The pico program is another editor inspired by simplicity. Typically used in conjunction with the pine mail reading system, pico can also be used as a stand-alone editor. Like joe, it can work in a manner similar to Notepad, but pico uses its own set of key combinations. All the available key combinations are always shown at the bottom of the screen. To start pico, simply type

[root@GP /root]# pico

Q25. What is RPM? What are their benefits?

Ans. The RPM package manager is an open source packaging system distributed under the GNU GPL. It runs on most Linux distributions and makes it easy for you to install, uninstall, and upgrade the software on your machine. RPM files can be easily recognized by their .rpm file extension and the 'package' icon that appears in your navigation window:



The benefits of using RPM can be

summarized as follows:

1. Simplicity: RPM simplifies the task of installing software. RPM packages can be

managed using the RPM GUI interface, or via the command line.

2. Upgradeability: RPM gives us the flexibility to upgrade existing packages without

having to reinstall them. You can freshen and upgrade parts, or all, of your system automatically, with the minimum difficulty.

3. Manageability: RPM makes it easy to manage software packages. It maintains a database of all the packages installed on the system, so you know exactly what you've got installed, what version it is, and when it was added.

4. Package queries: RPM provides options to query packages for more details in different ways. You cansearch the package installed on the system. You can also find out what package a file belongs to. It helps in keeping track of all packages installed on your system.

5. Uninstalling: RPM makes it easy to uninstall packages. This helps us to keep the system clean.

6. System verification: RPM also provides a feature to verify packages. In case of any doubt about file deletion, packages can be verified against the original package information using RPM. This checks all the files on the system with the package information and verifies that the files on the system are the same as those installed from the package originally.

7. Security: RPM provides commands for the user to check the integrity of packages. Packages can be checked using md5sum to verify that they have not been corrupted or tampered with since they were created. RPM also provides functionality to verify a package provider's identity and package integrity using gnupg.


Q26. What’s the purpose of Disk Druid? Explain the different parameters when you add a new partition.

Ans. Disk Druid Partitions is a program that partitions your hard drive for you. Choose Add to add a new partition, Edit to edit a partition, Delete to delete a partition and Reset to reset the partitions to the original state. When you add a new partition, a new window appears on your screen and gives you parameters to choose.

The different parameters are:



1. Mount Point: for where you want to mount your new partition in the file system.

2. Size (Megs): for the size of your new partition in megabytes.

3. Partition Type: Linux native for Linux file system and Swap for Linux Swap Partition.

Disk naming convention

First Two Letters: -

The first two letters of the partition name indicate the type of device on which the partition resides.

You'll normally see either hd (for IDE disks), or sd (for SCSI disks).

The Next Letter: -

This letter indicates which device the partition is on. For

example: /dev/had (the first IDE hard disk) and /dev/hdb (the second IDE disk).

Linux requires: - Swap partitions are used to support virtual memory. If your computer has 16 MB of RAM or less, you must create a swap partition. Even if you have more memory, a swap partition is still recommended. The minimum size of your swap partition should be equal to your computer's RAM or 16 MB (whichever is larger). The largest useable swap partition is roughly 1 GB, since 2.2 kernel, 1 GB swap file are supported so making a swap partition larger than that will result in wasted space.

Q27. Explain the different command-line user management tools to perform the same action performed by the GUI tool.

Ans. The following command line tools can be used to manage user:

1. useradd: - useradd allows you to add a single user to the system. Unlike the GUI tool, it offers no interactive prompts. Instead, all parameters must be specified on the command line. For example, to create a new user whose name is Gurpreet Singh, and is a member of the admin and support groups admin, and who prefers using the Turbo C Shell and wants the login name Gurpreet, you would use this line:

[root@GP /root]# useradd -c "Gurpreet Singh" -g admin -G support \ > -s /bin/tcsh Gurpreet

In this command;

–c Stand for comment,

-g Stand for initial-group,

-G Using this option, we can specify the default group the user has in the password file. We can use a number or name of the group; however, if we use a name of a group, the group must exist in the /etc/group file—for example, –g project.

-s This option lets you choose whichever shell you would like to run for the new user upon login. (A list of shells is available in /etc/shells.)



2. userdel : - The userdel command does the exact opposite of useradd—it removes existing users. This straightforward command has only one optional parameter and one required parameter:

Syntax


userdel [-r] username

By using the optional parameter (for example, userdel -r Gurpreet) all of the files owned by the

user in his home directory are removed as well.

3. usermod : - The usermod command allows you to modify an existing user in the system. It works in much the same way as useradd. Here’s an example of using usermod to change user gurpreet such that his comment field reads Number Nine instead of Gurpreet Singh.

[root@GP /root]# usermod -c "Number Nine” Gurpreet

4. groupadd: -The group commands are similar to the user commands. User commands works on individual users where as groups commands work on groups listed in the /etc/group file.

For example, if you remove a group whose GID is 100 and a user’s default group is specified as 100, the user’s default group would not be updated to reflect the fact that the group no longer exists. The groupadd command adds groups to the /etc/group file. The command-line options for this program are as follows.



groupadd [-g gid] [-r] [-f] group

to add a new group called research with the GID 800. To do so, you would type the following command:



[root@GP /root]# groupadd -g 800 research

5. groupdel: - Even more straightforward than userdel, the groupdel command removes existing groups specified in the /etc/group file. The only usage information needed for this command is groupdel group where group is the name of the group to remove. For example, if you wanted to remove the research group, you would issue this command:

[root@GP /root]# groupdel research

6. groupmod: - The groupmod command allows you to modify the parameters of an existing group. The options for this command are;

groupmod -g gid -n group-name group

Where the –g option allows you to change the GID of the group, and the –n option allows you to specify a new name of a group.



Q28. Write the steps to install a binary package in TAR format.

Ans. Software that comes in source form is often made available as a tarball—that is, it is archived into a single large file and then compressed. The tools used to do this are tar and gzip. Tar handles the process of combining many files into a single large file, and gzip is responsible for the compression.

To install a binary package in tar format follows the following steps.

1. Download the KDirStat source tarball. Which can be downloaded from its web site at http://kdirstat.sourceforge.net/. To unpack the KDirStat tarball, first become root user, and then move the file into the /usr/local/src directory, like so:

[GP@PTU ~]$ su -

[root@GP /root]# mv ~rwhite/kdirstat-2.2.0.tgz /usr/local/src

2. Then use the cd command to change directories to /usr/local/src,



[root@PTU /root]# cd /usr/local/src

3. Then unpack the tarball with the following command:



[root@GP src]# tar -xvzf kdirstat-2.2.0.tgz

This command will extract the contents into a directory named /usr/local/src/kdirstat-2.2.0.



[root@GP src]# cd /usr/local/src/kdirstat-2.2.0

4. Looking for Documentation: -Once you are inside the directory with all of the source code, begin looking for documentation. Typically there are two files in a distribution: README and INSTALL, both of which are located in the root of the source code directory. The README file generally includes a description of the package, references to additional documentation and references to the author of the package. The INSTALL file typically has directions for compiling and installing the package.

To view a text file, use the more command:

[root@GP kdirstat-2.2.0]# more README

To view the text file in an editor, use the pico command:



[root@GP kdirstat-2.2.0]# pico README

5. Configuring the Package: - Mostly packages come with an auto configuration script. These scripts are typically named “configure,” and they take parameters. To see what configure options come with a package, simply run



[root@Gp kdirstat-2.2.0]# ./configure --help

The two dashes (--) before the word “help.” The configure command will usually return a list of options that can be set when running the configuration script.

6. Compiling Your Package: - After configuring your package its time is to compile your package with the help of the following command.

[root@GP kdirstat-2.2.0]# make

The make tool reads all of the make files that were created by the configure script. These files

tell make, which files to compile and the order in which to compile them

7. Installing the Package: - After compilation its time to install the package with the help of following command.



[root@GP kdirstat-2.2.0]# make install

This will start the installation script. Because make displays each command as it is executing it, you will see a lot of text fly by. If we don’t see any error message the package is install.



Q29. What is the function of /etc/printcap file? Also Explain any five commands available in the /etc/printcap file for each printer?

Ans. The /etc/printcap file tells the LPRng server daemon (lpd) the names and characteristics of all of its printers. Every printer has an entry that looks something like this:

Printername1|printername2|printername3:

: command = value:

: command :

: command = value:

Where printername1 is the name of the printer, and printername2 and printername3 are aliases to printername1. Each command may be followed by a value.



The five commands of /etc/printcap file are;

1. sd : - Spool directory pathname. This is where the lpd server will place files that are being sent to the printer.

2. sh : - This command suppresses header/banner pages. Banner pages show that who printed the document and the name of the document.

3. rp : - Specify the remote printer queue. When redirecting print jobs to a remote print server, we need to specify the name of the remote print queue to which we want to submit the job, as well. Typically, this is because dedicated print servers control multiple printers. This command will let you specify the name of the print queue.

4. mx : - Specify the maximum job size in 1K blocks. 0 means no size limit.

5. rm : - Specify the remote machine. Since lpd can redirect print jobs to other print servers, it must be possible to specify the name of the remote print server. This command lets you do so. This is typically used in conjunction with the rp command.



Q30. Describe various options that can be used in conjunction with the mount command’s –o option.

Ans. - o options are usually used with the file system type. The various option that can be used in conjunction with the mount command’s are describe below.

Option for the mount –o

1. Ro: - Mounts the partition as read-only.

2. Rw: - Mounts the partition as read/write (default).

3. Exec: - Permits the execution of binaries (default).

4. Noatime : - Disables update of the access time on i-nodes. For partitions where the access time doesn’t matter (such as news spools), this improves performance. Noauto Disables automatic mount of this partition when the –a option is specified (applies only to the /etc/fstab file). Nosuid Disallows application of SetUID program bits to the mounted partition.

5. Remount : - Remounts an already-mounted file system with the now-current settings. This is an alternative to unmounting and remounting a partition to update its settings (for example, changing the partition from read-only to read/write).

6. loop: - The loopback option allows you to mount a file as if it was a device. For example, you could mount an ISO of a CD image without having to burn it to a CD-ROM. sb=n Tells mount to use block n as the superblock on an ext2/ext3 file system.

Q31. Explain the three tools : qutocheck, repquota and quota to manage the quotas.

Ans. 1. qutocheck: - The quotacheck command verifies the integrity of the quota

database. In the script presented earlier for turning on the quota subsystem, you started by running this script with the –avug option set.



The options you can pass to quotacheck are as follows:

–v Turns on verbose mode. This presents useful and interesting information as the quota databases are checked.

–u uid Checks the allocation of the user whose UID is uid.

–g gid Checks the allocation of all users whose GID is gid.

–a Checks all file systems that have quotas (as determined by the /etc/fstab file).

–r Used in conjunction with –a. Checks all partitions with quotas, except the root partition.



2. repquota : - The repquota command generates a summary report of quota usage on the system. This command takes the following options:

–a Reports on all file systems.

–v Reports on all quotas, even if there is no usage.

–g Reports on quotas for groups only.

–u Reports on quotas for users only.

3. quota : - Finally, the quota command is for users. It allows them to view the quota limitations placed on them. It takes the following options:

–g Prints quotas on groups of which the user is a member.

–u Prints quota information about the specific user (default).

–v Prints quota information as it pertains to the user for all file systems that support quotas.

–q Prints a message to the user if he is over quota.

For example, if user gurpreet were to run quota –v



[gurpreet@GP /root]# quota –v

Q32. What can you do with gnorpm and how?

Ans. The most convenient package manipulation tool is used in red Hat linux 7.0 is Gnome-RPM. This is a graphical tool that runs under the X Window System. Gnome-RPM (which is also referred to as gnorpm) allows the end-user to easily work with RPM technology; it is fast, powerful and features a friendly interface. Gnome-RPM is "GNOME-compliant," meaning that it seamlessly integrates into GNOME, the X Window System desktop environment.

With Gnome-RPM, we can easily

1. Install RPM Packages: -Installing a package places all of the components of that package on your system in the correct locations.

2. Uninstall RPM packages: -Uninstalling a package removes all traces of the package except for configuration files you have modified.

3. Upgrade RPM packages: -Upgrading a package installs the newly available version and uninstalls all other versions that were previously installed. This allows quick upgrading to the latest releases of packages.

4. Find new RPM packages: - You can also use the Web find option to search the Internet for newly released packages. You can direct Gnome-RPM to search for particular distributions when you want to look for new packages.

5. Query RPM packages: -The usual way to work with Gnome-RPM is to display the available packages, select the package(s) you want to operate on, and then select an option from the toolbar or menu which performs the operation. However, Gnome-RPM is flexible enough to display packages in a variety of views and use of filters.

6. Verify RPM packages: - We can query and verify more than one package at a time. Because of Gnome-RPM's integration with GNOME, you can also perform installation, query and verification on packages from within the GNOME File Manager.

Starting Gnome-RPM

We can start Gnome-RPM from either an Xterm window or from the GNOME desktop Panel (Main

Menu Button => System => Gnorpm).

To start Gnome-RPM from an Xterm window, at the shell prompt, simply type



#gnorpm &

That will bring up the main Gnome-RPM window as shown in to the figure. There

are several parts to the Gnome-RPM interface.

1. Package Panel - On the left; allows you to browse and select packages on your system.

2. Display window - To the right of the package panel; shows you contents from folders in the panel.

3. Toolbar - Above the display and panel; a graphical display of package tools.

4. Menu - Above the toolbar; contains text-based commands, as well as help info, preferences and other settings.

5. Status bar - Beneath the panel and display windows; shows the total number of selected packages.



Q33. What are the salient features of KDE?

Ans. KDE brings improvements in aesthetics, usability and performance as well as adding new functionality and features. The following are the some features;

  1. The Desktop: - The desktop pager shows the application icons of each window to help distinguish between them, and allows dragging and dropping windows from one desktop to another. In response to a great deal of user feedback, the pager and taskbar have three default styles: elegant, classic and transparent, which have been tweaked to make them more usable.

  2. 2. Kicker ToolTips: -The new Kicker tooltips that appeared for KDE have been extended to be used throughout Kicker, providing a consistent and visually unique desktop. An animated tooltip has been added to give visual feedback of the location of a newly added applet when adding through the add applet dialog.

  3. SuperKaramba: - A tool that allows us to easily create interactive eye-candy on the

desktop, is now included in KDE. Using SuperKaramba we can quickly add functionality such as weather and news updates, system monitors and alternatives to the existing functions of Kicker. New applets can be easily downloaded using the KHotNewStuff functionality.

  1. Konqueror: - Konqueror has now become the second browser to pass the arduous 'Acid2' css compliance test. Apple's Safari browser was the first, which makes use of Konqueror's advanced rendering engine KHTML. Hot on the tails of Firefox, Konqueror now also has the much-requested adblock feature, allowing you to filter out advertisements on web pages.

  2. Communications: - Kopete has benefited from a stable base with a raft of new

features added since KDE 3.4. With support for audio and video devices, with the help of Kopete, users can use of MSN and Yahoo! webcams. Managing several accounts has been made easier with the ability to export a global nickname and display picture via the global identity.

  1. Edutainment: - For families, schools and the young at heart KDE's edutainment team have added a surprising number of new applications and features. KGeography lets you browse maps, learn about a country's capital and flag, and to test your knowledge. Kanagram is a fully featured anagram game with a vocabulary editor, many built-in vocabularies and sound effects, and new data packs available through KHotNewStuff.

Q35. What are LILO options? When do we need them?

Ans. The following are the LILO options and their working;

1. boot=/dev/hda : - Tells LILO to install itself on the first hard disk on the first IDE controller.

2. map=/boot/map: - Locates the map file. In normal use, this should not be modified.

3. install=/boot/boot.b: - Tells LILO to install the specified file as the new boot sector. In normal use, this should not be altered. If the install line is missing, LILO will assume a default of /boot/boot.b as the file to be used.

4. Prompt: -Existence of prompt tells LILO to show you whatever is referenced in the message line. While it is not recommended that you remove the prompt line, if you do remove it, you can still get a prompt by holding down the [Shift] key while your machine starts to boot.

5. Timeout=50: - sets the amount of time that LILO will wait for user input before proceeding with booting the default line entry. This is measured in tenths of a second, with 50 as the default.

6. message=/boot/message: - Refers to the screen that LILO displays to let you select the operating system or kernel to boot.

7. default=linux : - Refers to the default operating system for LILO to boot from the options listed below this line. The name linux refers to the label line below in each of the boot options.

8. image=/boot/vmlinuz-2.4.0-0.43.6: - Specifies the linux kernel to boot with this particular boot option.

9. label=linux: - Names the operating system option in the LILO screen. In this case, it is also the name referred to by the default line.

10. initrd=/boot/initrd-2.4.0-0.43.6.img: - Refers to the initial ram disk image that is used at boot time to actually initialize and start the devices that makes booting the kernel possible. The initial ram disk is a collection of machine-specific drivers necessary to operate a SCSI card, hard drive, or any other device needed to load the kernel. You should never try to share initial ram disks between machines.

11. read-only : -Specifies that the root partition (see the root line below) is read-only and cannot be altered during the boot process.

12. root=/dev/hda5: - Tells LILO what disk partition to use as the root partition. LILO configuration file, /etc/lilo.conf, to determine what to write to the MBR. These options are needed when we want to install more then one operating system at a time on a single hard disk (or on a single PC). The lilo.conf file provides the way of booting option to run the required operating system by the user.

Section –A (Updated 2008)
Q1. Write the steps in boot process.

Ans. The steps in boot process are;

1. First load menu code, typically /boot/boot.b

2. Then prompt for (or timeout to default) partition or kernel

3. for "image=" (ie Linux) option load kernel image

4. for "other=" (ie DOS) option load first 512 bytes of the partition



Q2. Explain the steps in bootstrapping?

Ans. Bootstrap (or "to boot") is to load a program into a computer using a small initial program to load in the desired program (which is usually an operating system).



Q3. List the steps used to create a working multi-OS system.

Ans. The Linux installation procedure will ask you for a location to install the bootloader (LILO or GRUB)

1. If we choose the MBR option, a new one for LILO will replace the old MBC used by Windows NTLDR. Our computer will display the LILO boot menu instead of the NTLDR boot menu after the installation. A Linux boot sector will also be written to / or /boot.

2. If we choose first sector of the root partition option, then a Linux boot sector will be written on / or /boot. Our computer will continue to boot with the NTLDR boot menu because the MBC on the MBR has been left untouched.

3. If we choose the floppy option, then a Linux boot sector will be written on to a floppy disc. We can use this floppy disk to boot in to Linux after setting the floppy drive as the first boot device in BIOS.

Q4. Write about GNOME is a s a graphical desktop.

Ans. GNOME is an international effort to build a complete desktop environment, the graphical user interface which sits on top of a computer operating system entirely from free software. This goal includes creating software development frameworks, selecting application software for the desktop, and working on the programs which manage application launching, file handling, and window and task management.



Q5. Draw the ext2 filesystem Diagrams.

Ans. The diagram of ext2 file system is as follows;



Q6. Differentiate between root user & normal user.

Ans. root, which is also referred to as the root user, the administrative user, the system administrator, the root account and the superuser, is the user name or account that has access to all commands and files on a Unix-like operating system. Where as normal user, have no rights to create a new user or access any other user information.



Q7. How we can change permission rights?

Ans. With the help of chmod we can change permission rights. The chmod command (abbreviated from change mode) is a shell command in Unix and Unix-like environments. When executed, the command can change file system modes of files and directories. The modes include permissions and special modes.



Q8. What is SUID/SGID & sticky bit?

Ans. SUID stands for set user id. When a SUID file executed, the process which runs it is granted access to system resources based on the user who owns the file and not the user who created the process. SGID stands for set group id. When looking at files SGID they behave much the same as SUID files, and must be executable for it to have any effect. The SGID bit on a directory means files created in that directory will have their group set to the directory's group.



Sticky bit work on directories, where, when sticky bit set, items inside the directory can be renamed or deleted only by the item's owner, the directory's owner, or the superuser (Without the sticky bit set, a user with write and execute permissions for the directory can rename or delete any file inside, regardless of the file's owner.) Frequently this is set on the /tmp directory to prevent ordinary users from deleting or moving other users' files.

Q9. Describe Unix Operating System.

Ans. Unix (officially trademarked as UNIX®, sometimes also written as Unix or Unix® with small caps) is a computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs including Ken Thompson, Dennis Ritchie and Douglas McIlroy. Today's Unix systems are split into various branches, developed over time by AT&T as well as various commercial vendors and non-profit organizations. Unix operating systems are widely used in both servers and workstations.



Q10. Write the main features of common desktop.

Ans. The main features of common desktop are;

Feature Benefit

Extended front panel

Add/delete new action buttons for launching your most frequently used applications or scripts

Workgroup calendar Schedule and review appointments, as well as those of colleagues

PC interoperability View fully formatted documents Text and voice notes

Voice or text input with single-click controls for convenient and reliable future access




Download 495.38 Kb.

Share with your friends:
1   2   3   4   5   6   7   8




The database is protected by copyright ©ininet.org 2024
send message

    Main page