Wednesday, November 2, 2011

Linux Interview Questions and Answers

1.Q: How are you qualified to be a Linux administrator?
A: I have a lot of experience as a system administrator; I am an expert in computer technology, software and hardware and a good technical knowledge in many fields. I also worked in a team and I have the skills required for communication in teamwork. Linux is one of the domains I know the most and I am able to provide all kinds of Linux services.

2.Q: Is there a minimum requirement for the partition amount when installing Linux?
A: We need a minimum of two Linux partitions, one is the root or / and has all the files, the second one is the swap. In Linux file system the files or folders are arranged after the function they are performing, for instance the executable files have their own folder, devices have another, the libraries have a folder etc. The base of the Linux file system is the root, which is on top of all other folders, it can be compared to the windows type C:. The swap partition is meant to be the virtual memory, meaning that when the Ram is depleted the Linux system will use the hard disk, an area from it will be used for temporary data. Actually swap extends the RAM.

3.Q: Why is Qmail so good?
A:The strong points of Qmail are the great security, the improved speed, better reliability, better design, easier configuration, unnecessary upgrade. The features supported by Qmail are various: user or host masquerading, virtual domains, list-owner rewriting, relay control, full hiding of host, double-bounce-recording and many, many others.

4.Q: What utility do we have to use for a log to rotate automatically?
A: For automatic rotation, mailing or removal if the log files, for compressing or rotating the log files each day (when the file is too big) we can use the logrotate command: logrotate [-dv][-f|] [-s|] config file+. We can also use it with the –f option in the command line or for mailing with –m, which has two arguments: the subject and the recipient name.

5.Q: How do we store an application’s documentation?
A: The documentation of an application is usually installed together with the application and the directory that we named for the application will be used for storage. As an example: we have the application App1- the documentation will be stored at /user/doc/App1. The documentations means all the information regarding that application including the time when it was created, its modules and of course its name.
6.Q: In what case do we use a virtual hosting?
A: A Virtual host means that we can have multiple servers on the same machine with an apparently different name of the host. Many companies like to have a sharing web server with their own domains (www.company1.com, www.company2.com) and not require the user to learn additional information regarding path.

7.Q: How is a new user account created?
A: To create a new user account we must use the useradd command. With no –D option, the useradd the new account is determined by the default system values and the values from the command line. The home directory will be the that of the system default, for making the home directory, the option used is –m.

8.Q: In what way is IMAP different than POP3?
A: With POP3 the inbox is verified on the server of the mail and the new mails are downloaded on your computer and stored there. With IMAP the mail headers are downloaded on the server and when you click on the mail message you can read it. The storage is made on the mail server in case of IMAP but they can be copied in your PC’s “Local Floder”. So POP3 is useful when u use a single computer for email checking and in this case there is no need to store the messages on the mail server. When you use more than one place or computer to verify your email IMAP is the solution.

9.Q: What type of file server do we have on a Linux server?
A: The place used for maintaining files for the purpose of being accessed by the network systems is called a file server. The files can receive different access privileges. In Linux there is a software called “samba” for file sharing, file editing and viewing on remote systems that support Windows 9x, Millenium, 2000 and NT or Mac computers. Whwnever we delete a file we may recover it because all the time a backup is made for the files from the file server.

10.Q: What is the meaning of Linux Shell and Shell Script?
A: These two are a little different because Linux Shell is an interface for command execution and Shell is a user program for command execution. So the Script Shell is obviously a script made for the Shell program, A Shell Script is not hard to be checked for errors, in comparison to other programs that are bigger. Anyway it has a disadvantage: it is a little slow due to new processes that are started for each execution of a shell command.

11. Q:How is the SATA hard disk configuration made when we install Redhat 9?
A: The driver must be put on a floppy disk, then when setup boots from the CD or DVD at the command promt write dd; later the driver will be loaded from the floppy drive, after this we can use the fdisk or disk druid utilities to configure the partitions. When the drivers setup is automatically the things become simple as in the case of IDE drives, but they can be accessed by /dev /sda, /dev /sdb an so on.

12. Can you give a detailed explanation on how the boot process of the Linux version you like happens?
A: Yes, in the beginning the boot loaders are being loaded by the BIOS then they are loading the kernel, then the file systems are mounted by the kernel so the drivers can begin installing and loading. To be more detailed the boot process happens in 4 major steps:
1)when we turn on the computer the Bios is called (that chip from the motherboard) and it starts the processor and the power on tests for verifying the devices that are connected and their availability for use. After this is done the BIOS will cross in a Specific place in the memory (RAM) and look for the booting device. The hard disk will have a boot sector which is the first sector and from here the MBR will be loaded in the RAM.
2)the booting process is performed by the boot loader (for example GRUB and LILO are common used boot loaders), this will give the user different boot options and this is what determines how the kernel is loaded.
3)the kernel handles the boot process after it is loaded and the hardware initialization begins, partitions are created by the kernel.
4)INITloads.
13. Q:How can we describe a Stateless Linux server and what are its features?
A: The Linux centralized server that has no workstation state is called a Stateless Linux server. This server is being seen when a specific system’s state is wanted by the user to be in the other machines too. Practically this server is storing each machine’s prototype and each machine’s snapshots, also the home directories. To know what state fits each system we must use LDAP.

14.Q: What daemon does the event tracking in Linux?
A: For tracking information about a system syslogd is used, it helps us saving the information in log files too. It is used by the Unix or Internet sockets for remote and local logging. The logged messages some field like hostname, time or program name, which are the information that the daemon is tracking. The signals that the user is giving make syslogd react, these signals are: SIGHUP- which performs a re-initialization by closing all the files that are open and re-reading the cinfiguaration file (/etc/syslog.conf by dfault)and restarting the syslog;SiGTERMsyslogd is killed;SIGINT, SISQUIT-if the debugging is not activated syslog will be killed, but if it’s activated these signals are ignored;SIGURSR1- this is a signal that is used along with –d or debug option which is switched on or off;SIGCHLD-due to waiting messages it waits for childs.

15. Q:In the time of setup, which is the server type that we can use for giving IP addresses in a remote way to machines?
A: For doing this a DHCP sever can be used.

16. Q:How can we define SELinux?
A:SELinux is the name for Security-enhanced Linux which, as a prototype of Linux kernel that contains utilities which are made for improved functionality of the security feature in such a way to prove to the Linux community the value of Linux controls. In order to achieve greater security for the Flask system new design are made for the architectural components based on Role-based Accsess Control, Multi-level Security and Type Enforcement.

17. Q:Which is the recommended size for the swap space partition?
A: Because the use of the swap space for extending the physical memory, the quantity of memory(RAM) from the system determines the needed size of the swap space. The physical memory and the swap space can be calculated together in Linux as the total amount of memory, so when for instance we have 16 MB of memory on the motherboard of the computer and we assign 8MB for swapping the total memory used by Linux will be 24.

18. Q:What do we use for managing hash table collisions?
A:There are two ways of managing hash table collisions: one is open addressing and the other is separate chaining. The first way the data items are moved from the full array they hash to and their new place is another cell from the array. The second way every element of the array is made from a linked list and in this list the data items are moved.

19. Q: What actually means Linux?
A:Linux is an open source operating system kernel that is behaving better than many others and it has all the required features for a modern and complete operating system: real multitasking, shared libraries, threads, virtual memory, executables, excellent management of memory, device drivers that can be loaded , frame buffering of video or TCP/IP.

20. Q: How can we recover a file that was deleted in Linux?
A: We can see what was the partition where the lost file was located with the pwd (means present work directory) and with the unmount command we can unmount the directory. Then the “debugfs” command will manage and repair the majority of sever errors or bugs from Linux. The entire code is: #debugfs /usr/directory name. the next step is using “Isdel”.

21. Q:How can we see the boot messages?
A: For viewing the boot messages we can use dmesg, a command that prints on the screen the kernel ring buffer messages; the command is to be used just after the boot sequence. The syntax of a ring buffer is like this: dmesg [options]. If dmesg is called with no options the messages from the kernel will be written to the standard output.

22. Q: How do we give a shadow password?
A: Shadow passwords are given using pwconv command and their purpose is the increase in system security. The file /etc/shadow gets created with that command and modifications are made to the passwords, they will be replaces with “x” in /etc/passwd file.

23.Q:In what way are home directories different from working directory?
A: The directory over which we as users have the control and when we log in it is the working directory. But the current user working directory is not necessarily the home directory.

24.Q:What separates Unix Linux?
A: The graphics are different, Linux has more commands, Linux has more user-friendly features than Unix, Linux is versatile and independent while Unix requires special machine for installation, kernel and file system is different.

25.Q:Which is the required command for checking the file system?
A: For checking the disk integrity and file system the command used is fsck.

No comments:

Post a Comment