Q. Compare help and info command?

info reads documentation in the info format.
Info is similar to man with a more robust structure for linking pages together. Info pages are made using the texinfo tools, and can link with other pages, create menus and ease navigation in general.
The default location of info documentation is /usr/share/info.

For example:
info emacs


Display information about builtin commands.
If PATTERN is specified, gives detailed help on all commands matching PATTERN, otherwise the list of help topics is printed.

For example:
help echo

Q. Explain the fields in /etc/password and /etc/shadow command.


/etc/passwd file is one of the most important files as it possess all the necessary details about every account in the Linux system.
/etc/passwd maintains the information about each and every user that can use the system. Every time a new user account is created, the user account details are stored in the same file.


/etc/pasword, which stores one line entry for each user that can access the system. As one of the fields in each line of the /etc/passwd denotes whether the password for that user is stored in /etc/shadow file or not.
The actual passwords in encrypted forms are stored in the /etc/shadow file.

Q. What is difference between Hard Link and Soft Link?

Hard Links
1. Hard Links have same inodes number.
2. ls -l command shows all the links with the link column showing the number of links.
3. Links have actual file contents
4. Removing any link, just reduces the link count but doesn't affect the other links.
5. You cannot create a Hard Link for a directory.
6. Even if the original file is removed, the link will still show you the contents of the file.

Soft Links
1. Soft Links have different inodes numbers.
2. ls -l command shows all links with second column value 1 and the link points to original file.
3. Soft Link contains the path for original file and not the contents.
4. Removing soft link doesn't affect anything but when the original file is removed, the link becomes a 'dangling' link that points to nonexistent file.
5. A Soft Link can link to a directory.

Q. What are run levels in Linux? How do you change them?


A runlevel is a preset single digit integer that defines the operating state of a Linux and Unix-like operating system handled by init. Each runlevel allows for different combinations of running processes and vary depending on the operating system being used. The standard Linux kernel supports seven different runlevels, as shown below.
0 - System halt.
1 - Single user.
2 - Multiple users with no NFS.
3 - Multiple users under the command line.
4 - User-definable.
5 - Multiple users under a GUI.
6 - Reboot.


We can use init command to change rune levels without rebooting the system.
Ex:-if we are currently in run level 3 and want to go to run level 1, just we need to execute
# init 1
Or if you want to shutdown a machine you can take help of run level ‘0’ .Just you need to execute
#init 0

Q. Explain STD IN and STD OUT?

Most Linux commands read input, such as a file or another attribute for the command, and write output. By default, input is being given with the keyboard, and output is displayed on your screen. Your keyboard is your "standard input" (stdin) device, and the screen is the "standard output" (stdout) device.
However, since Linux is a flexible system, these default settings don't necessarily have to be applied. The standard output, for example, on a heavily monitored server in a large environment may be a printer.

Q. What is difference between locate and find command?

find command

find searches in the real system. find slower but always up-to-date and has more options (size, modification time,...).
find will work in online mode.

locate command

locate uses a previously built database. locate much faster, but uses an 'older' database and searches only names or parts of them.
locate  will work in offline mode.

locate is faster than find but find is real time.

What is login and non-login shells? Explain with example?

Shells in UNIX are classified into two categories:
Login Shell
Sub shell (Non-Login shell)
Login shell is a shell where the user reaches on trying to login to his account. This login shell, ksh or bash or tcsh or sh, is defined for the user at the time of user account creation. However, the login shell of an user can always be changed by the root user.
Non login shell
  Sub shell or a non-login is a shell which is invoked from the login shell or from a different sub shell by just typing the name of the shell. In fact, whenever a shell script is run, a sub-shell is opened internally and the script is run from the sub-shell.

How to go to a sub-shell (non login shell)?
 Simple, from the current shell, if you want to go to a k-shell, type 'ksh' at the prompt.

Q. What do you mean by open source?

Q. What is x-window system? Explain?

Q. What is absolute and relative pathnames?

Q. What is the inode and Explain?
For answer click here.

Q. What are shells scripts? Write the procedure for creating it?

Related topics

Professor Jayesh video tutorial

Please use contact page in this website if you find anything incorrect or you want to share more information about the topic discussed above.