Section – a 2 Marks Questions


Q8. How mail is setup in Linux?



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

Q8. How mail is setup in Linux?

Ans. Creating a new user means not only creating the user’s home directory and setting up the environment, it also means making it possible for the user to send and received mails. Mailbox are kept in the /var/spool/mail directory. Each user has a mailbox that ius based on their login names. E.g if a user name is jones then mailbox is var/spool/mail/jones.

An empty mailbox is a zero length file. To create a zero length file anywhere in the system use



[root@ford /root] # touch myfile

Q9. How Executable Files are made in Linux?

Ans. The chmod command is used to set permission values. Permissions are

Letter Permission Value

R Read 4

W Write 2

X Execute 1

If you want to change a file so that it is executable to an owner then use following command



[root@ford /root] # chmod u+x foobar.sh

Q10. What do you mean by GNU Public License?

Ans. In the year 1980 Richard Stallman began a movement within the software industry. He preached that the software should be free, mean not as a price wise. He wants that the software should be comes along with their source code. From this line of thinking put a desire to release freeware software to the public, which should be free of license restriction the GNU project launched. GNU stands for GNU’s Not UNIX. GNU is also known as GNU Public License (GPL). This license explicitly states that the software

being released is free, and no one can ever take away these freedoms.



Q11. What information contained in /etc directory?

Ans. The /etc Directory: - The /etc directory is reserved for configuration files that are local to your machine. No binaries are to be put in /etc. Any binaries that were formerly put in /etc should now go into /sbin or possibly /bin. The X11 and skel directories are subdirectories of the /etc directory:

/etc


|- X11

|- skel


The X11 directory is for X11 configuration _les such as XF86Config. The skel directory is for "skeleton" user files, which are used to populate a home directory when a user is first created.

Q12. What is the difference between Registry & Text File?

Ans. There is no more difference between registry & Text File. These both contain the system configuration database. The only difference is that windows 2000 configuration database is stored in registry and Linux database kept as a series of text files. These setup means we are able to edit configuration files using any text editor tools rather then using windows 2000 REGEDIT tool. The Linux Configuration files exist in /etc directory or one of its subdirectory.

Q13. For Installation of Linux how many Partitions are required?

Ans. For Installation of Linux at least we required two Partitions, One for holding all of the OS files and 2nd one for Swap partition. The first partition file system should be Native, ext2 or ext3 and should be minimum of 2.5 MB and Swap space is usually sized to be double the available RAM. If the Ram is 128MB then the space should be 256 MB. Actually this space is used for memory allocation.

Q14. How to create Boot Disk in Linux?

Ans. Once the installation process is complete, red hat give you a prompt for creation the floppy disk. This is due to if our installed boot loader is failed to access the boot loader from the hard disk then we can recover it with the help of this floppy. Just insert the floppy disk into the floppy drive click next. It start copying files into the disk.

Q15. What are SetUID and SetGID Programs?

Ans. SetUID stands for set user identification. SetUID allows a program to be run with permission from the programs owner not by the user who is running it. For example if we setUID bit on ls command which is owned by root and run by PTU user then this command will run only with the root permission not with the PTU user. PTU user can only run this command but the owner of this command will be root. Where as the SetGID bit also does the same way, except instead of applying the files owner; it is applied on the file group settings.

Q16. What is difference between gzip and tar?

Ans. gzip: - is used to compress and decompress the files. It reduces the size of file. Gzip can also decompress the files, which are compressed by Unix tool compress. These types files are typically end with the extension .GZ.

tar: - tar programs combines multiple files into a single large file. It is separate from the compression tool. Another thing tar is able to read and write to devices in much the same way dd can. Another thing it compiles all the files when it extract.

Q17. How to compile the source?

Ans. To compile CUPS from source, follow the directions that come the software package. I have found it is much easier to just install the RPM for CUPS that it is to compile and install by hand. The source code CUPS can be found at http://www.cups.org/ installation instructions are bundled with the software. We will also want to look at the Foomatic package located at http://www.linuxprinting.org; they provide numerous printer drivers for various printing systems including CUPS.

Q18. How to Distributions to printer?

Ans. Have a Linux distribution such as Mandrake or Red Hat, Cups should be available as an RPM or package. The is the recommended method for using CUPS. The distribution vendor has done the hard work to make sure that CUPS works well with their system. If you are unfortunate enough to have a Linux distribution that doesn’t have CUPS. You can compile the package from source code.

Q19. How to install CUPS?

Ans. The cups software was developed by easy software products. There are two methods of installation, through your Linux distribution or by compiling from source. The first method is highly recommended as the distributions typically have all of the popular printer support built into CUPS. With compiling by hand, you have to get drivers for your printer yourself.

Q20. What is Network File system?

Ans. Network file system makes it possible for you to dedicate systems to serving disks while letting clients handle the computer-intensive tasks of users. Centralized disks mean easier backup solutions and ready physical security. Under Linux, disk centralization is accomplished through the Network File System (NFS).

Q21. Explain texinfo system.

Ans. It established as the GNU standard, texinfo is a documentation system similar to the hyperlinked World Wide Web format. Because documents can be hyperlinked together, texinfo is often easier to read, use, and search. To read the texinfo documents on a specific tool or application, invoke info with the parameter specifying the tool’s name. For example, to read about emacs, type:

[root@gp /root]$ info emacs



Q22. What is the role of KDE control center?

Ans. The KDE Control Center is like a Control Panel for Windows. The Control Center offers an impressive array of tools for configuring KDE. It includes support for a variety of themes, colors, backgrounds, screen savers, certain applications, and certain types of hardware.

Q23. What is the downside of X window?

Ans. It is the actual program, which is working behind the X windows. A Windows programmer might equate programming for X to programming for the original MS Windows prior to the visual tools and MFC libraries. Commercial UNIX vendors tried to fix this problem with the Common Desktop Environment so that their users would get a consistent look and feel, and an improved library for X called Motif was developed. For Linux, both of these developments presented a problem, because they went against the ideal of being open source.

Q24. What is role of uptime command in linux?

Ans. uptime gives a one-line display information of the current time, how long the system has been running, how many users are currently logged on, and the system load averages for the past 1, 5, and 15 minutes.

Q25. What is purpose of telinit command?

Ans. Init is the parent of all processes. Its primary role is to create processes from a script stored in the file /etc/inittab (see inittab (5)). This file usually has entries, which cause init to spawn gettys on each line that users can log in. It also controls autonomous processes required by any particular system.

Q26. Describe runlevels item in the /etc/inittab file’s line format.

Ans. init reads its configuration file from /etc/inittab and determines the runlevel where it should start. The format of each line in this file is as follows:

id: runlevels: action: process

/etc/inittab Entry Description

id A unique sequence of 1–4 characters that identifies this entry in the /etc/inittab file. runlevels The runlevels at which the process should be invoked. Some events are special enough that they can be trapped at all. To indicate that an event is applicable to all runlevels, leave runlevels blank. If you want something to occur at multiple runlevels, simply list all of them in this field. For example, the runlevels entry 123 specifies something that runs at runlevels 1, 2, and 3. action Describes what action should be taken. process Names the process (program) to execute when the runlevel is entered.



Q27. Describe the structure of I-node table.

Ans. An i-node is a control structure that points either to other i-nodes or to data blocks. The control information in the i-node includes the file’s owner, permissions, size, time of last access, creation time, group ID, etc. The one thing an i-node does not keep is the file’s name. This means that each directory gets an i-node, and the i-node points to data blocks containing information (filenames and i-nodes) about the files in the directory. The i-nodes are used to provide indirection so that more data blocks can be pointed to—which is why each i-node does not contain the filename.

Q28. What will be the output of the command: rm *i*

Ans. rm removes each specified file. By default, it does not remove directories. Where as rm *I* will erase all those files, which start from any name, but their second character must be i and last characters could be anything.

Q29. What will be the output of the command: ls –lu

Ans. ls – lu command will display long listing, of the filename, file size, date/time, permissions, ownership, and group information and use time of last access instead of last modification for sorting or printing.

Q30. What is difference between internal & external Commands?

Ans. Internal command are those commands that comes along with the Operating System. Where as external commands are those commands, which needs to install on the operating system to run for the specific task. In others words external commands are not by default installed where as Internal command are installed by default.
Section – B 5 Marks Questions

[QUESTIONS 1 TO 20] [PAGE 17 TO 24]
Q1. What is a Shadow file? Explain it in brief.

Ans. Traditional Unix systems keep user account information, including one-way encrypted passwords, in a text file called ``/etc/passwd''. As this file is used by many tools (such as ``ls'') to display file ownerships, etc. by matching user id #'s with the user's names, the file needs to be world-readable. Consequentially, this can be somewhat of a security risk. Another method of storing account information, one that I always use, is with the shadow password format. As with the traditional method, this method stores account information in the /etc/passwd file in a compatible format. However, the password is stored as a single “x” character (ie. not actually stored in this file). A second file, called “/etc/shadow”, contains encrypted password as well as other information such as account or password expiration values, etc. The /etc/shadow file is readable only by the root account and is therefore less chance of a security risk.

Q2. Define Features of Linux.

Ans. Here are some of the benefits and features that Linux provides over single-user operating systems (such as MS-DOS) and other versions of UNIX for the PC.

1. Full multitasking and 32-bit support. Linux, like all other versions of UNIX, is a real multitasking system, allowing multiple users to run many programs on the same system at once.

The performance of a 50 MHz 486 system running Linux is comparable to many low- to medium-end workstations, such as those from Sun Microsystems and DEC, running proprietary versions of UNIX. Linux is also a full 32-bit operating system, utilizing the special protected mode features of the Intel 80386 and 80486 processors.



2. GNU software support. Linux supports a wide range of free software written by the GNU Project, including utilities such as the GNU C and C++ compiler, gawk, groff, and so on. Many of the essential system utilities used by Linux are GNU software.

Q3. What is the X Window System?

Ans. The X Window System is a network-transparent window system, which runs on a wide range of computing and graphics machines. X Window System servers run on computers with bitmap displays. The X server distributes user input to and accepts output requests from several client programs through a variety of different interpose communication channels. Although the most common case is for the client programs to be running on the same machine as the server, clients can be run transparently from other machines (including machines with different architectures and operating systems) as well. X supports overlapping hierarchical sub-windows and text and graphics operations, on both monochrome and color displays. The number of X client programs that use the X server is quite large. Some of the programs provided in the core X Consortium distribution include:

xterm: A terminal emulator ·

twm: A minimalist window manager ·

xdm: A display manager ·

xconsole: A console redirect program ·

bitmap: A bitmap editor ·

xauth, xhost and iceauth: Access control programs ·

xset, xmodmap and many others: user preference setting programs

xclock: A clock ·

xlsfonts and others: A font displayer, utilities for listing information `about fonts, windows and displays

· xfs: A font server

Q4. What is GNOME? Also write down their features?

Ans. The GNOME is user-friendly environment that enables user to easily use and configure their computers. GNOME includes a panel, a desktop (where data and application can placed), a set of standard desktop tools and applications, and a set of conventions that makes it easy for application to cooperate and be consistent with each other.

Features of GNOME

1. GNOME is...Free : - GNOME is Free Software and part of the GNU project, dedicated to giving users and developers the ultimate level of control over their desktops, their software.

2. Usable:- GNOME understands that usability is about creating software that is easy for everyone to use, not about piling on features. GNOME's community of professional and volunteer usability experts have created Free Software's first and only Human Interface Guidelines, and all core GNOME software is adopting these principles.

3. Accessible: - Free Software is about enabling software freedom for everyone, including users and developers with disabilities. GNOME's Accessibility framework is the result of several years of effort, and makes GNOME the most accessible desktop for any Unix platform.

4. Developer-friendly: - Developers are not tied to a single language with GNOME. You can use C, C++, Python, Perl, Java, even C#, to produce high-quality applications that integrate smoothly into the rest of your Unix or Linux desktop.

5. Organized: - GNOME strives to be an organized community, with a foundation of several hundred members, usability, accessibility, and QA teams, and an elected board..

6. Supported: - Beyond the worldwide GNOME Community, GNOME is supported by the leading companies in Linux and Unix, including HP, Mandrake Soft, Novell, Red Hat, and Sun.

Q5. How various permission for a file can be set and changed?

Ans. Every file and directory on a Linux/Unix system has a set of access permissions associated with it. These include the owner of a file, the group a file is associated with, and who has read, write, and execute permission on that file. These permissions allow you to choose who can use your files, and control what they can do with them.

With the command ls you can see the contents of a directory.



[emcna bb@grape emcnabb]$ ls

If you use ls -l you see extra information about each file.



[emcnabb@grape emcnabb]$ ls -l

-rw-r--r-- 1 emcnabb admin 107 Jan 10 10:06 accounts.txt

drwxr-xr-x 3 emcnabb admin 4096 Mar 29 2002 backgrounds

-rw-r--r-- 1 emcnabb admin 2414 Apr 1 08:28 ChessClassDiagram

drwx------ 5 emcnabb admin 4096 Mar 14 14:25 cs240

drwxr-xr-x 6 emcnabb admin 4096 Apr 16 2002 cs312

From left to right, these are the explanations of each field returned.

The permissions that are set on this file or directory. The number of items within the file or directory. Only directories should have a value greater than 1. The owner of the file. In this case, emcnabb. The group the file is associated with. In this case, admin. The size of the file in bytes. A directory is usually size 4096. Last modification date: Month/Day/Year. The file or directory's name.


Now an explanation of permissions.

Permission attributes are the first field of output for ls -l. They are shown as ten characters where each character represents a specific attribute. If the first character on the left is a 'd', the item is a directory; if it is a '-' it is a file. The other nine attributes can be one of the following permissions.



r = read

w = write

x = execute

X = conditional execute

S = set id

t = sticky

r, w, and x are simple permissions which grant that type of access to the specified category of user. X, s, and t can be somewhat complicated.

Permissions can be granted to three different categories of users: user (u), group (g), and other (o). The user permissions pertain to the current owner of the file, which is normally who created it. The group permission pertains to users who are listed in the group to which the file is assigned. All other users belong to the other category. The other category is also often referred to as "world". Additionally, you can choose to grant permission to all types of user (a). Each category of user is described with three characters in ls -l's output: read, write, and execute. The first three (after the file/directory flag) describe user permissions, the second three pertain to the group, and the last three are world permissions. As an example, let's look at the permissions for the directory 'backgrounds'. They are broken up from left to right in four parts.

d:- This is a directory

rwx:- Owner Permissions: read, write, and execute permissions are set, so the owner can do anything he or she desires with the directory.

r-x : - Group Permissions: anyone who is a member of the group can read or access the directory, but not modify it (create new files).

r-x : - World Permissions: anyone who is a not the owner of the file or a member of the group can read or access the directory, but not modify it.



Q6. How to set permissions?

Ans. Setting permissions on files and directories is done using the chmod command. The basic syntax of

chmod is chmod


.

The permission mode is set using the one letter code for the user category, an operator such as + to add the permission and - to remove the permission, and the one letter code for the permission. If we want to add user execute permissions to the accounts.txt file,

For example, we should use the command chmod u+x accounts.txt.

The output from ls -l accounts.txt now reads:



-rwxr--r-- 1 emcnabb admin 107 Jan 10 10:06 accounts.txt

Now we can tell the operating system to execute this file.If you want to change multiple permissions for multiple types of users, you can use the numeric representation of the permission modes. The numeric mode is really cool, and worth learning (After all, who doesn't want to practice converting from binary to octal in their head?), but will not be discussed here. For more information, read chmod's man page.



Numeric setting of permissions

You can also set your permissions via a numeric system:

1 eXecute

2 Write


3 eXecute and Write (1 + 2 = 3)

4 Read


5 eXecute and Read (1 + 4 = 5)

6 Write and Read (2 + 4 = 6)

7 eXecture, Write, and Read (1 + 2 + 4 = 7)

For example: #chmod 754 filename will give the owner rwx, the group r-x, and all Users r--



Q7. How to set default permissions?

Ans. The command umask defines the default permissions that will be given to all new files created by a user. umask takes arguments in a manner similar to chmod, but the arguments represent permissions that will not be granted (they will be masked). These arguments can be presented in symbolic mode, or as octal numbers. Hence, a umask of og+w means that a newly created file will have permissions of -rw-rw-rw-, and a umask of 077 yields default permissions of -rw-------. The default umask on a system can usually be found in /etc/bashrc. Set the umask in your .bashrc file using a line such as this: umask 077 umask does not affect the executable permissions of a file. Files will not have the executable bit set by default; that must be added with chmod. Directories will have the executable bit set by default, as this bit enables users to view inside them.

Important permissions to set

Prevent others from reading or changing files in your home directory

Setting permissions for WebPages



Preventing others from reading or changing files in your home directory

To prevent others from accessing your home directory, you should make sure that your home directory is not world or group readable or write able. You do this with the command chmod go-wr. executed from your home directory.

Make sure that you do not grant world or group write permissions on your directories. Users can remove files that they do not own from a directory where they have write permission. World and group write permissions on you home directory allow other users to delete all of your files.

Q8. What are different features of X Windows?

Ans. The X Window System is a graphics system primarily used on Unix systems (and, less commonly, on VMS, MVS, and MS-Windows systems) that provides an inherently client/server oriented base for displaying windowed graphics. It provides a public protocol by which client programs can query and update information on X servers.

X reverses these roles, which, as the locations of the hosts are reversed, is quite appropriate: An X server is a program that manages a video system, where as X client is typically an application program, which must connect to an X Server in order to display things.




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