Linux Interview Questions And Answers

Linux Interview Questions list for experienced

  1. Which account is created on Linux installation?
  2. Which daemon tracks events on your system?
  3. Which command would you use if you want to remove the password assigned to a group?
  4. You wish to print a file 'draft' with 60 lines to a page. What command would you use?
  5. Which file would you examine to determine the levels of messages written to system log files?
  6. You are logged on as a regular user. Without logging off and logging on as root, you are required to create a new user account immediately. How would you do it?
  7. You are required to restore the file memo.ben. It was backed up in the tar file MyBackup.tar. Which command would you use to do it?
  8. What is partial backup?
  9. What is the fastest way to enter a series of commands from the command-line?
  10. What are the qualities of soft links?
  11. Differentiate between Cron and Anacron.
  12. What is an INODE?
  13. Which command is used to check the number of files and disk space used and the each user's defined quota?
  14. What is the name and path of the main system log?
  15. How secured is Linux? Explain.
  16. Can Linux computer be made a router so that several machines may share a single Internet connection? How?
  17. What is the minimum number of partitions you need to install Linux?
  18. Which command is used to review boot messages?
  19. Which utility is used to make automate rotation of a log?
  20. What are the partitions created on the mail server hard drive?
  21. What are the fields in the/etc/passwd file?
  22. Which commands are used to set a processor-intensive job to use less CPU time?
  23. How to change window manager by editing your home directory?
  24. How documentation of an application is stored?
  25. How shadow passwords are given?
  26. How do you create a new user account?
  27. Which password package is installed for the security of central password?
  28. Which shell do you assign to a POP3 mail-only account?
  29. Which daemon is responsible for tracking events on Linux system?
  30. Which daemon is used for scheduling of the commands?
  31. How environment variable is set so that the file permission can be automatically set to the newly created files?
  32. What is Linux?
  33. What is the difference between UNIX and LINUX?
  34. What is BASH?
  35. What is Linux Kernel?
  36. What is LILO?
  37. What is a swap space?
  38. What is the advantage of open source?
  39. What are the basic components of Linux?
  40. What could possibly be the problem when a command that was issued gave a different result from the last time it was used?
  41. What are the contents in /usr/local?
  42. How do you terminate an ongoing process?
  43. How do you insert comments in the command line prompt?
  44. What is command grouping and how does it work?
  45. How do you execute more than one command or program from a single command line entry?
  46. Write a command that will look for files with an extension "c", and has the occurrence of the string "apple" in it.
  47. Write a command that will display all .txt files, including its individual permission.
  48. Write a command that will do the following: -look for all files in the current and subsequent directories with an extension c,v -strip the,v from the result (you can use sed command) -use the result and use a grep command to search for all occurrences of the word ORANGE in the files.
  49. What, if anything, is wrong with each of the following commands? a) ls -l-s b) cat file1, file2 c) ls – s Factdir
  50. What does tee command do in MySQL?
  51. Does it help for a Linux system to have multiple desktop environments installed?
  52. What is the basic difference between BASH and DOS?
  53. What is the importance of the GNU project?
  54. Describe the root account.
  55. What is CLI?
  56. What is GUI?
  57. How do you open a command prompt when issuing a command?
  58. How can you find out how much memory Linux is using?
  59. What is typical size for a swap partition under a Linux system?
  60. What are symbolic links?
  61. Does the Ctrl+Alt+Del key combination work on Linux?
  62. How do you refer to the parallel port where devices such as printers are connected?
  63. Are drives such as harddrive and floppy drives represented with drive letters?
  64. How do you change permissions under Linux?
  65. In Linux, what names are assigned to the different serial ports?
  66. How do you access partitions under Linux?
  67. What are hard links?
  68. What is the maximum length for a filename under Linux?
  69. What are filenames that are preceded by a dot?
  70. Explain virtual desktop.
  71. How do you share a program across different virtual desktops under Linux?
  72. What does a nameless (empty) directory represent?
  73. What is the pwd command?
  74. What are daemons?
  75. How do you switch from one desktop environment to another, such as switching from KDE to Gnome?
  76. What are the kinds of permissions under Linux?
  77. How does case sensitivity affect the way you use commands?
  78. What are environmental variables?
  79. What is redirection?
  80. What is grep command?
  81. What is an Operating System?
  82. What is The benefits of using Linux?

Linux interview questions and answers on advance and basic Linux with example so this page for both freshers and experienced condidate. Fill the form below we will send the all interview questions on Linux also add your Questions if any you have to ask and for apply in Linux Tutorials and Training course just send a mail on info@pcds.co.in in detail about your self.

Top Linux interview questions and answers for freshers and experienced

What is Linux ?

Answer : GNU/Linux, commonly shortened as Linux, is an open source operating system. Use this tag only if your question relates to using Linux APIs or Linux-specific behavior. Questions relating to using or troubleshooting Linux are off topi

Questions : 1 :: Which account is created on Linux installation?

- With the installation of Linux, a super user account is created called as ‘root’.

Questions : 2 :: Which daemon tracks events on your system?

- The syslogd daemon tracks the system information and saves it to specified log files.

Questions : 3 :: Which command would you use if you want to remove the password assigned to a group?


- gpasswd – r removes the password from the group. - Here, the gpasswd changes the password of the group and when it is accompanied by –r, the password gets...View answers

Questions : 4 :: You wish to print a file 'draft' with 60 lines to a page. What command would you use?

- The command that I would use is: pr -l60 draft- The default page length when using pr is 66 lines. - The -l option specifies a different...View answers

Questions : 5 :: Which file would you examine to determine the levels of messages written to system log files?

- kernel.h

Questions : 6 :: You are logged on as a regular user. Without logging off and logging on as root, you are required to create a new user account immediately. How would you do it?


- This can be achieved by issuing the su command. - This will prompt you for the password of the root account.- Providing the password, logs you in as root. Now, you can perform any...View answers

Questions : 7 :: You are required to restore the file memo.ben. It was backed up in the tar file MyBackup.tar. Which command would you use to do it?

- The command that we would use is: tar xf MyBackup.tar memo.ben- It uses the x switch to extract a file.

Questions : 8 :: What is partial backup?

- When you select only a portion of your file hierarchy or a single partition to back up, it is called partial back up.

Questions : 9 :: What is the fastest way to enter a series of commands from the command-line?


- Write the commands, each separated by a semi-colon. Press enter after the last command. - The semi-colon would inform the shell that multiple commands are being entered at the command line, to...View answers

Questions : 10 :: What are the qualities of soft links?

a.) Soft link files have different inode numbers than source fileb.) The soft link file will be of no use if original file is deleted. c.) Soft links are not updatedd.) They can create links...View answers

Questions : 11 :: Differentiate between Cron and Anacron.

a.) Minimum granularity with Cron is minute while it is in days with Anacron. b.) Cron job can be scheduled by any normal user while Anacron can be scheduled only by the super user. c.)...View answers

Questions : 12 :: What is an INODE?

- It is a structure which has the description of all the files and pointers to the data blocks of file stored in it. - The information contained is file-size, access and modification time,...View answers

Questions : 13 :: Which command is used to check the number of files and disk space used and the each user's defined quota?

repquota command is used to check the status of the user’s quota along with the disk space and number of files used. This command gives a summary of the user’s quota that how much space...View answers

Questions : 14 :: What is the name and path of the main system log?

By default the main system log is /var/log/messages. This file contains all the messages and the script written by the user. By default all scripts are saved in this file. This is the standard system...View answers

Questions : 15 :: How secured is Linux? Explain.

Security is the most important aspect of an operating system. Due to its unique authentication module, Linux is considered as more secured than other operating systems. Linux consists of PAM. PAM is...View answers

Questions : 16 :: Can Linux computer be made a router so that several machines may share a single Internet connection? How?

Yes a Linux machine can be made a router. This is called "IP Masquerade." IP Masquerade is a networking function in Linux similar to the one-to-many (1: Many) NAT (Network Address...View answers

Questions : 17 :: What is the minimum number of partitions you need to install Linux?

Minimum 2 partitions are needed for installing Linux. The one is / or root which contains all the files and the other is swap. Linux file system is function specific which means that files and...View answers

Questions : 18 :: Which command is used to review boot messages?

dmesg command is used to review boot messages. This command will display system messages contained in the kernel ring buffer. We can use this command immediately after booting to see boot messages. A...View answers

Questions : 19 :: Which utility is used to make automate rotation of a log?

logrotate command is used to make automate rotation of log.Syntax of the command is:logrotate [-dv] [-f|] [-s|] config_file+It allows automatic rotation, compression, removal, and mailing of log...View answers

Questions : 20 :: What are the partitions created on the mail server hard drive?

The main partitions are done firstly which are root, swap and boot partition. But for the mail server three different partitions are also done which are as follows:1. /var/spool- This is done so that...View answers

Questions : 21 :: What are the fields in the/etc/passwd file?

It contains all the information of the users who log into the system. It contains a list of the system's accounts, giving for each account some useful information like user ID, group ID, home...View answers

Questions : 22 :: Which commands are used to set a processor-intensive job to use less CPU time?

nice command is used for changing priority of the jobs.Syntax: nice [OPTION] [COMMAND [ARG]...]Range of priority goes from -20 (highest priority) to 19 (lowest).Priority is given to a job so that the...View answers

Questions : 23 :: How to change window manager by editing your home directory?

/.xinitrc file allows changing the window manager we want to use when logging into X from that account. The dot in the file name shows you that the file is a hidden file and doesn't show when you do...View answers

Questions : 24 :: How documentation of an application is stored?

When a new application is installed its documentation is also installed. This documentation is stored under the directory named for application. For example if my application name is App1 then the...View answers

Questions : 25 :: How shadow passwords are given?

pwconv command is used for giving shadow passwords. Shadow passwords are given for better system security. The pwconv command creates the file /etc/shadow and changes all passwords to ‘x’...View answers

Questions : 26 :: How do you create a new user account?

useradd command is used for creating a new user account. When invoked without the-D option, the useradd command creates a new user account using the values specified on the command line and the...View answers

Questions : 27 :: Which password package is installed for the security of central password?

Shadow password packages are used for security of central passwords. Security is the most important aspect of every operating system. When this package is not installed the user information including...View answers

Questions : 28 :: Which shell do you assign to a POP3 mail-only account?

POP3 mail only account is assigned to the /bin/false shell. However, assigning bash shell to a POP3 mail only gives user login access, which is avoided. /bin/nologin can also be used. This shell is...View answers

Questions : 29 :: Which daemon is responsible for tracking events on Linux system?

syslogd is responsible for tracking system information and save it to the desired log files. It provides two system utilities which provide system logging and kernel message trapping. Internet and...View answers

Questions : 30 :: Which daemon is used for scheduling of the commands?

The crontab command is used for scheduling of the commands to run at a later time. SYNTAXcrontab [ -u user ] filecrontab [ -u user ] { -l | -r | -e }Options-l List - display the current crontab...View answers

Questions : 31 :: How environment variable is set so that the file permission can be automatically set to the newly created files?

umask command is used to set file permission on newly created files automatically. Syntaxumask [-p] [-S] [mode]It is represented in octal numbers. We can simply use this command without...View answers

Questions : 32 :: What is Linux?

Linux is an operating system based on UNIX, and was first introduced by Linus Torvalds. It is based on the Linux Kernel, and can run on different hardware platforms manufactured by Intel, MIPS, HP,...View answers

Questions : 33 :: What is the difference between UNIX and LINUX?

Unix originally began as a propriety operating system from Bell Laboratories, which later on spawned into different commercial versions. On the other hand, Linux is free, open source and intended as...View answers

Questions : 34 :: What is BASH?

BASH is short for Bourne Again SHell. It was written by Steve Bourne as a replacement to the original Bourne Shell (represented by /bin/sh). It combines all the features from the original version of...View answers

Questions : 35 :: What is Linux Kernel?

The Linux Kernel is a low-level systems software whose main role is to manage hardware resources for the user. It is also used to provide an interface for user-level interaction.

Questions : 36 :: What is LILO?

LILO is a boot loader for Linux. It is used mainly to load the Linux operating system into main memory so that it can begin its operations.

Questions : 37 :: What is a swap space?

A swap space is a certain amount of space used by Linux to temporarily hold some programs that are running concurrently. This happens when RAM does not have enough memory to hold all programs that...View answers

Questions : 38 :: What is the advantage of open source?

Open source allows you to distribute your software, including source codes freely to anyone who is interested. People would then be able to add features and even debug and correct errors that are in...View answers

Questions : 39 :: What are the basic components of Linux?

Just like any other typical operating system, Linux has all of these components: kernel, shells and GUIs, system utilities, and application program. What makes Linux advantageous over other operating...View answers

Questions : 40 :: What could possibly be the problem when a command that was issued gave a different result from the last time it was used?

One highly possible reason for getting different results from what seems to be the same command has something to do with case sensitivity issues. Since Linux is case sensitive, a command that was...View answers

Questions : 41 :: What are the contents in /usr/local?

It contains locally installed files. This directory actually matters in environments where files are stored on the network. Specifically, locally-installed files go to /usr/local/bin, /usr/local/lib,...View answers

Questions : 42 :: How do you terminate an ongoing process?

Every process in the system is identified by a unique process id or pid. Use the kill command followed by the pid in order to terminate that process. To terminate all process at once, use kill...View answers

Questions : 43 :: How do you insert comments in the command line prompt?

Comments are created by typing the # symbol before the actual comment text. This tells the shell to completely ignore what follows. For example: “# This is just a comment that the shell will...View answers

Questions : 44 :: What is command grouping and how does it work?

You can use parentheses to group commands. For example, if you want to send the current date and time along with the contents of a file named OUTPUT to a second file named MYDATES, you can apply...View answers

Questions : 45 :: How do you execute more than one command or program from a single command line entry?

You can combine several commands by separating each command or program using a semicolon symbol. For example, you can issue such a series of commands in a single...View answers

Questions : 46 :: Write a command that will look for files with an extension "c", and has the occurrence of the string "apple" in it.

Find./...View answers

Questions : 47 :: Write a command that will display all .txt files, including its individual permission.

ls -a -l*.txt

Questions : 48 :: Write a command that will do the following: -look for all files in the current and subsequent directories with an extension c,v -strip the,v from the result (you can use sed command) -use the result and use a grep command to search for all occurrences of the word ORANGE in the files.

Find./...View answers

Questions : 49 :: What, if anything, is wrong with each of the following commands? a) ls -l-s b) cat file1, file2 c) ls – s Factdir

a) there should be space between the 2 options: ls -l -s b) do not use commas to separate arguments: cat file1 file2 c) there should be no space between hyphen and option label: ls –s Factdir

Questions : 50 :: What does tee command do in MySQL?

Linux is an operating system based on UNIX, and was first introduced by Linus Torvalds. It is based on the Linux Kernel, and can run on different hardware platforms manufactured by Intel, MIPS, HP,...View answers

Questions : 51 :: Does it help for a Linux system to have multiple desktop environments installed?

In general, one desktop environment, like KDE or Gnome, is good enough to operate without issues. It’s all a matter of preference for the user, although the system allows switching from one...View answers

Questions : 52 :: What is the basic difference between BASH and DOS?

The key differences between the BASH and DOS console lies in 3 areas: – BASH commands are case sensitive while DOS commands are not; – under BASH, / character is a directory separator and...View answers

Questions : 53 :: What is the importance of the GNU project?

This so-called Free software movement allows several advantages, such as the freedom to run programs for any purpose and freedom to study and modify a program to your needs. It also allows you to...View answers

Questions : 54 :: Describe the root account.

The root account is like a systems administrator account, and allows you full control of the system. Here you can create and maintain user accounts, assigning different permissions for each account....View answers

Questions : 55 :: What is CLI?

CLI is short for Command Line Interface. This interface allows user to type declarative commands to instruct the computer to perform operations. CLI offers an advantage in that there is greater...View answers

Questions : 56 :: What is GUI?

GUI, or Graphical User Interface, makes use of images and icons that users click and manipulate as a way of communicating with the computer. Instead of having to remember and type commands, the use...View answers

Questions : 57 :: How do you open a command prompt when issuing a command?

To open the default shell (which is where the command prompt can be found), press Ctrl-Alt-F1. This will provide a command line interface (CLI) from which you can run commands as needed.

Questions : 58 :: How can you find out how much memory Linux is using?

From a command shell, use the “concatenate” command: cat /proc/meminfo for memory usage information. You should see a line starting something like: Mem: 64655360, etc. This is the total...View answers

Questions : 59 :: What is typical size for a swap partition under a Linux system?

The preferred size for a swap partition is twice the amount of physical memory available on the system. If this is not possible, then the minimum size should be the same as the amount of memory...View answers

Questions : 60 :: What are symbolic links?

Symbolic links act similarly to shortcuts in Windows. Such links point to programs, files or directories. It also allows you instant access to it without having to go directly to the entire...View answers

Questions : 61 :: Does the Ctrl+Alt+Del key combination work on Linux?

Yes, it does. Just like Windows, you can use this key combination to perform a system restart. One difference is that you won’t be getting any confirmation message and therefore, reboot is...View answers

Questions : 62 :: How do you refer to the parallel port where devices such as printers are connected?

Whereas under Windows you refer to the parallel port as the LPT port, under Linux you refer to it as /dev/lp . LPT1, LPT2 and LPT3 would therefore be referred to as /dev/lp0, /dev/lp1, or /dev/lp2...View answers

Questions : 63 :: Are drives such as harddrive and floppy drives represented with drive letters?

No. In Linux, each drive and device has different designations. For example, floppy drives are referred to as /dev/fd0 and /dev/fd1. IDE/EIDE hard drives are referred to as /dev/hda, /dev/hdb,...View answers

Questions : 64 :: How do you change permissions under Linux?

Assuming you are the system administrator or the owner of a file or directory, you can grant permission using the chmod command. Use + symbol to add permission or – symbol to deny permission,...View answers

Questions : 65 :: In Linux, what names are assigned to the different serial ports?

Serial ports are identified as /dev/ttyS0 to /dev/ttyS7. These are the equivalent names of COM1 to COM8 in Windows.

Questions : 66 :: How do you access partitions under Linux?

Linux assigns numbers at the end of the drive identifier. For example, if the first IDE hard drive had three primary partitions, they would be named/numbered, /dev/hda1, /dev/hda2 and...View answers

Questions : 67 :: What are hard links?

Hard links point directly to the physical file on disk, and not on the path name. This means that if you rename or move the original file, the link will not break, since the link is for the file...View answers

Questions : 68 :: What is the maximum length for a filename under Linux?

Any filename can have a maximum of 255 characters. This limit does not include the path name, so therefore the entire pathname and filename could well exceed 255 characters.

Questions : 69 :: What are filenames that are preceded by a dot?

In general, filenames that are preceded by a dot are hidden files. These files can be configuration files that hold important data or setup info. Setting these files as hidden makes it less likely to...View answers

Questions : 70 :: Explain virtual desktop.

This serves as an alternative to minimizing and maximizing different windows on the current desktop. Using virtual desktops, each desktop is a clean slate where you can open one or more programs....View answers

Questions : 71 :: How do you share a program across different virtual desktops under Linux?

To share a program across different virtual desktops, in the upper left-hand corner of a program window look for an icon that looks like a pushpin. Pressing this button will “pin” that...View answers

Questions : 72 :: What does a nameless (empty) directory represent?

This empty directory name serves as the nameless base of the Linux file system. This serves as an attachment for all other directories, files, drives and devices.

Questions : 73 :: What is the pwd command?

The pwd command is short for print working directory command. It’s counterpart in DOS is the cd command, and is used to display the current location in the directory tree.

Questions : 74 :: What are daemons?

Daemons are services that provide several functions that may not be available under the base operating system. Its main task is to listen for service request and at the same time to act on these...View answers

Questions : 75 :: How do you switch from one desktop environment to another, such as switching from KDE to Gnome?

Assuming you have these two environments installed, just log out from the graphical interface. Then at the Log in screen, type your login ID and password and choose which session type you wish to...View answers

Questions : 76 :: What are the kinds of permissions under Linux?

There are 3 kinds of permissions under Linux: – Read: users may read the files or list the directory – Write: users may write to the file of new files to the directory – Execute:...View answers

Questions : 77 :: How does case sensitivity affect the way you use commands?

When we talk about case sensitivity, commands are considered identical only if every character is encoded as is, including lowercase and uppercase letters. This means that CD, cd and Cd are three...View answers

Questions : 78 :: What are environmental variables?

Environmental variables are global settings that control the shell’s function as well as that of other Linux programs. Another common term for environmental variables is global shell...View answers

Questions : 79 :: What is redirection?

Redirection is the process of directing data from one output to another. It can also be used to direct an output as an input to another...View answers

Questions : 80 :: What is grep command?

grep a search command that makes use of pattern-based searching. It makes use of options and parameters that is specified along the command line and applies this pattern into searching the required...View answers

Questions : 81 :: What is an Operating System?

Every time you switch on your computer, you see a screen where you can perform different activities like write, browse the internet or watch a video. What is it that makes the computer hardware work...View answers

Questions : 82 :: What is The benefits of using Linux?

Linux now enjoys popularity at its prime and it's famous among programmers as well as regular computer users around the world. Its main benefits are - It offers a free operating system. You do not...View answers
More Question

Ask your interview questions on Linux

Write Your comment or Questions if you want the answers on Linux from Linux Experts
Name* :
Email Id* :
Mob no* :
Question
Or
Comment* :
 





Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website. If you are using this website then its your own responsibility to understand the content of the website

--------- Tutorials ---