Q11. Write the characteristics of ext2 file system
Ans. The main characteristics of ext2 file system are;
1. When creating an Ext2 filesystem, the system administrator may choose how many inodes to allow for a partition of a given size, depending on the expected number of files to be stored on it. This maximizes the effectively usable disk space.
2. The filesystem partitions disk blocks into groups. Each group includes data blocks and inodes stored in adjacent tracks. Thanks to this structure, files stored in a single block group can be accessed with a lower average disk seek time.
3. The file system preallocates disk data blocks to regular files before they are actually used. Thus, when the file increases in size, several blocks are already reserved at physically adjacent positions, reducing file fragmentation.
4. Fast symbolic links (see the section "Hard and Soft Links" in Chapter 1) are supported. If the symbolic link represents a short pathname (at most 60 characters), it can be stored in the inode and can thus be translated without reading a data block.
Q12. Write the list about the default directory layout.
Ans. Linux uses the Filesystem Hierarchy Standard (FHS), which is a organized layout of all files and directories used by UNIX and its clones. Everything is stored in one big tree-like structure. At the base is the /, or root directory (sometimes referred to as the root—please do not confuse this with the root user, these are two different ideas). All other directories branch out of the root directory.
Mounting Device To
/dev/hda1 /
/dev/cdrom /mnt/cdrom
Q13. How will you start and stop the network service?
Ans. The following command is used in RedHat to reload or restart network service (login as root user):
To start FreeBSD network service:
# /etc/rc.d/netif start
Or
# service network start
To stop FreeBSD network service:
# service network stop
OR
# /etc/rc.d/netif stop
Q14. How will schedule a command to be executed at a specified instant?
Ans. You schedule one off tasks in Linux using the at command and recurring jobs using the crontab command.
#at
To schedule a one off job type at at the command prompt followed by the time when you want the command to run. For example
#at 19:00
#at now+15 minutes
#at May 1 07:00
In the first instance the job will be scheduled for 7pm tonight (or tomorrow night if it is already after 7pm). In the second instance the job will run fifteen minutes after you press enter. In the third instance the job will run at 7am on 1st May.
Q15. What is the role of make command?
Ans. The make command allows you to manage large programs or groups of programs. As you begin to write larger programs, you will notice that re-compiling larger programs takes much longer than re-compiling short programs. Moreover, you notice that you usually only work on a small section of the program (such as a single function that you are debugging), and much of the rest of the program remains unchanged.
Q16. Write the purpose of group identifies?
Ans. A group identifier, often abbreviated to GID, is a numeric value used to represent a specific group. The range of values for a GID varies amongst different systems; at the very least, a GID can be between 0 and 32767, with one restriction: the login group for the Superuser must have GID 0. This numeric value is used to refer to groups in the /etc/passwd and /etc/group files or their equivalents. Shadow password files and Network Information Service also refer to numeric GIDs. The group identifier is a necessary component of Unix file systems and processes.
Section – B
(5 Marks each)
Q1. How many types of Licenses exist for the distribution of Linux? Explain.
Ans. Published software should be free software. To make it free software, you need to release it under a free software license. We normally use the GNU General Public License (GNU GPL), but occasionally we use other free software licenses, like as;
1. GNU General Public License: - The GNU General Public License is often called the GNU GPL for short; it is used by most GNU programs, and by more than half of all free software packages. The latest version is version 3. The GNU General Public License is available in these formats: HTML, plain text, ODF, Docbook, Texinfo, and Latex. These documents are not formatted for standalone publishing, and are intended to be included in another document.
2. BSD licenses: -This represents a family of permissive free software licenses. The original was used for the Berkeley Software Distribution, a Unix-like operating system for which the license is named. The original owners of BSD were the Regents of the University of California because BSD was first written at the University of California, Berkeley. The BSD license allows people to make changes to the code and ship those changes without having to disclose the added code.
3. Apache: - The Apache License is a free-software license authored by the Apache Software Foundation (ASF). The Apache License requires preservation of the copyright notice and disclaimer, but it is not a copy left license. It allows use of the source code for the development of free and open source software as well as proprietary software.
4. Apple Public Source License (APSL), version 2 : - This is a free software license, incompatible with the GNU GPL. We recommend that you not use this license for new software that you write, but it is ok to use and improve the software released under this license.
5. Common Development and Distribution License (CDDL) : - This is a free software license. It has a copy left with a scope that's similar to the one in the Mozilla Public License, which makes it incompatible with the GNU GPL. This means a module covered by the GPL and a module covered by the CDDL cannot legally be linked together. We urge you not to use the CDDL for this reason.
Q2. What is Desktop & how Windows Managers is more lightweight then desktop?
Ans. A desktop is a computer display area that represents the kinds of objects one might find on a real desktop: documents, phonebook, telephone, reference sources, writing (and possibly drawing) tools, project folders. A desktop can be contained in a window that is part of the total display area or can be "full-screen". In Linux we have multiple desktops and switch among them.
Most Linux-based distributions for the masses have GNOME, KDE, or both desktops, yet the startup times and resources required by both GNOME and KDE make them unsuitable for old or lower-end hardware. For a standards-compliant, fast, lightweight, and extensible window manager is the Openbox. Openbox complies with both the Inter-Client Communication Conventions Manual (ICCCM) and the Extended Window Manager Hints (EWMH). Originally derived from Blackbox, Openbox version 3 was completely rewritten in C. Among its fancy features, it supports chainable key bindings, customizable mouse actions, and multi-head Xinerama.
Unlike GNOME or KDE, Openbox as a window manager is a drawing board; where we can add our own desktop icons and panels. It's not as difficult as it sounds, and it gives you the freedom to design your own desktop.
Q3. Write the current status in Linux development? Who are some of the key player? How is the project managed?
Ans. Although Linux is supplied with the complete source code, it is copyrighted software, not public domain. However, it is available for free under the GNU General Public License, sometimes referred to as the “copy left”. The programs that run under Linux each have their own copyright, although many of them use the GPL as well. X uses the MIT X copyright, and some utilities are under the BSD copyright. In any case, all of the software on the FTP site is freely distributable Key player of Linux: - Red Hat, Fedora, Mandrake, Suse and Debian, are main key players of Linux
1. Red Hat: - Red Hat Linux, assembled by the company Red Hat, was a popular, "middle-aged" Linux distribution (not as old as Slackware but older than Ubuntu) upon its discontinuation in 2004. Red Hat Linux 1.0 was released on November 3, 1994. It is the first Linux distribution to use RPM as its packaging format and over time has served as the starting point for several other distributions, such as Mandriva Linux and Yellow Dog Linux. Since 2003, Red Hat has discontinued the Red Hat Linux line in favor of Red Hat Enterprise Linux (RHEL) for enterprise environments.
2. Fedora: - developed by the community-supported Fedora Project and sponsored by Red Hat, is the free version best suited for the home environment. Red Hat Linux 9, the final release, hit its official end-of-life on April 30, 2004, although updates were published for it through 2006 by the Fedora Legacy project until that shut down in early 2007.
3. Mandrake: - Mandriva Linux (formerly Mandrakelinux or Mandrake Linux) is a Linux distribution created by Mandriva (formerly Mandrake soft). It uses the RPM Package Manager. The product lifetime of Mandriva Linux releases is 18 months for base updates and 12 months for desktop updates.
4. Suse: - SUSE is a major retail Linux distribution, produced in Germany and owned by Novell, Inc. SUSE is also a founding member of the Desktop Linux Consortium. As of version 10.2 Alpha 3, the distribution is officially named openSUSE.
5. Debian: - is a computer operating system composed entirely of software which is both free and open source. Its primary form, Debian GNU/Linux, is a popular and influential Linux distribution. It is a multipurpose OS; it can be used as a desktop, laptop, or server.
Every linux distributors have their own way to handle their projects. Like as in Red Hat Linux
Packages are handles by rpm.(i.e Red hat Package Manager)
Q4. What is rebooting process & write the steps involved in shutting down the process.
Ans. Rebooting process: -
To reboot the system: - We can also use the init command to reboot the system immediately by entering runlevel 6.
[root@bigboy tmp]# init 6
The "reboot" command has the same effect, but it also sends a warning message to all users.
[root@bigboy tmp]# reboot
Q5. Explain the steps how file systems is automatically mounted and unmounted?
Ans. File system can moun automatically with the help of automounter. Automounter relies on NFS.
Before using it we have to sure that we can do normal NFS mounts. Once we have done, make a simple change to your startup scripts to deploy the automounter. Before this make sure autofs
script is started when the system enters in the runlevel 3.
To start the automounter by manullay run the following command;
[root@gp /root]# /etc/rc.d/init.d/autofs start
If you change any of the map files while the automounter is runing you need to restart the automounter so that it can reread the configuration files. This is done by using autofs as follows;
[root@gp /root]# /etc/rc.d/init.d/autofs reload
The file system management process begins with the root directory. The Partition conatting the kernel and core directory structured is mounted at boot time. This single partition needs to have all the required utilities and configuration files to bring the system up to single user mode.
When a new directory is mounted, it hides all the contents of the previous mounted directory.
To mount a device directory ptovide the following command.
[root@gp /root]# mount [options] device directory
The options are
-a Mounts all the files ssytems listed in /etc/fstab.
-t fstype Specifies the type of file system being mounted.
- o options Specifies the options applying to this mount process.
The following mount command mounts the /dev/hda3 partition to the /usr directory with readonly priveledges;
[root@gp /root]# mount – o ro /dev/hda3 /usr
To unmount ther File system
[root@gp /root]# umount /usr
Q6. Explain how we are creating a group & how new user accounts are added to the groups?
Ans. Every user who has access to a Linux system needs a login and a password. Each user must belong to a primary group and for security or access purposes can belong to several secondary groups. Creating a Group and Adding Users to the Group : -
1. Login with the root account.
2. At the command prompt, type:
#groupadd Engineering
Press Enter. This will create the Engineering group.
3. Next, add a student account to the new Engineering group by typing:
#usermod –G Engineering studentA5
Press Enter. This will add the studentA5 account to the Engineering Group.
4. Verify that the new group has been created by typing:
#grep studentA5 /etc/group
The grep command looks for strings of text. In this case, the user asked the grep command to look in the /etc/group file for anything named studentA5.
The output will look like the following;
Q7. Write about working of : SYSLOGD, Klogd & Tripwire.
Ans. Syslogd: - System logging is provided by a version of Syslogd derived from the stock BSD sources. It support for kernel logging, which is provided by the klogd utility, which allows kernel logging to be conducted in either a standalone fashion, or as a client of Syslogd. Syslogd provides a kind of logging that many modern programs use. Every logged message contains at least a time and a hostname field, normally a program name field, too, but that depends on how trusty the logging program is. The main configuration file /etc/syslog.conf or an alternative file, given with the -f option, is read at startup. Any lines that begin with the hash mark (``#'') and empty lines are ignored. If an error occurs during parsing the whole line is ignored.
Klogd: - klogd is a system daemon which intercepts and logs Linux kernel messages. The functionality of klogd has been typically incorporated into other versions of syslogd but this seems to be a poor place for it. In the modern Linux kernel a number of kernel messaging issues such as sourcing, prioritization and resolution of kernel addresses must be addressed. Incorporating kernel logging into a separate process offers a cleaner separation of services. In Linux there are two potential sources of kernel log information: the /proc file system and the syscall (sys_syslog) interface. Klogd is designed to choose whichever source of information is the most appropriate. It does this by first checking for the presence of a mounted /proc file system. If this is found the /proc/kmsg file is used as the source of kernel log information. If the proc file system is not mounted klogd uses a system call to obtain kernel messages. If kernel messages are directed through the syslogd daemon the klogd daemon, as of version 1.1, has the ability to properly prioritize kernel messages. Prioritization of the kernel messages was added to it at approximately version 0.99pl13 of the kernel. The raw kernel messages are of the form:
<[0-7]>Something said by the kernel.
Tripwire: - Tripwire 2.4.1 is a file integrity assessment product for Linux networks. Rather than preventing an intruder or virus from attacking system files, Tripwire detects intrusions when they do occur. By comparing system files and directories against a previously stored "baseline" database, Tripwire finds any additions, deletions, or changes to specified properties. This allows the system administrator to determine the extent of the problem and begin necessary damage control. After Tripwire is installed on a system, the following four commands are used:
#tripwire
is used for most of the basic operations of the software. This includes creation of the Tripwire database, and checking the integrity of the filesystem against that database.
#twadmin
This is used to create, encode, and sign Tripwire policy, configuration, and key files, and for various administrative functions.
#twprint
prints Tripwire database and report files in a plain text format.
#siggen
is a file utility that displays hash values for files. In addition to the command references listed above, the following three man pages provide information on important components of the Tripwire package.
Q8. What is main diffrence between man & info? What are some advantages of each.
Ans. man: -Almost all substantial UNIX and Linux like operating systems have extensive documentation known as man pages (short for "manual pages"). The Linux command used to display them is man. Each page is a self-contained document. To read a page from the manual, one can use the command
#man
Manual sections the manual is generally split into eight numbered sections, organized as follows:
To check out the particular Section provide the command in the following manner;
The above said command check out the help from the manual section no 3 which is C library function.
Info: - info is a software utility which forms a hypertextual, multipage documentation and help viewer working on a command line interface, so no GUI is needed. info processes info files, which are Texinfo formatted files, and presents the documentation as a tree, with simple commands to traverse the tree and to follow cross references. For instance • n goes to the next page.
•p goes to the previous page.
• u goes to the upper page.
• l goes to the last(visited) node
To follow a cross reference, the cursor can be moved over a link (a word preceded by a *) and enter pressed. info was initially written for use with GNU/Linux and then ported to other Unixlike operating systems.
Advantages: -
1. man is divided into eight section, which make easiest way to find out the particular command or programe help. Where as info is taged with hyperlinked, which help help viewer working on a command line interface, so no GUI is needed.
2. info files, which are Texinfo formatted files, and presents the documentation as a tree, with simple commands to traverse the tree and to follow cross-references.
Q9. Why shouldn’t a linux system be turned off with the power button on the computer case?
Share with your friends: |