Thursday 24 September 2015

55 Top Linux Interview Questions and Answers

1.  What is GRUB
GNU GRUB is a Multiboot boot loader. It was derived from GRUB, the GRand Unified Bootloader, which was originally designed and implemented by Erich Stefan Boleyn.
Briefly, a boot loader is the first software program that runs when a computer starts. It is  responsible for loading and trferring control to the operating system kernel software (such as the Hurd or Linux). The kernel, in turn, initializes the rest of the operating system (e.g. GNU)

2. Which files are called for user profile by default when a user gets login
$HOME/.bash_profile, $HOME/.bash_bashrc

3. Which file needs to update if srequired to change default runlevel 5 to 3
File is /etc/inittab and required to change below lines:
id:5:initdefault: to id:3:initdefault:

4. What command used for showing user info like Login Name, Canonical Name, Home Directory,Shell etc..
FINGER command can be used i.g; finger username

5. What is inode number
An inode is a data structure on a traditional Unix-style file system such as UFS or ext3. An inode stores basic information about a regular file, directory, or other file system object.
iNode number also called as index number, it consists following attributes:
File type (executable, block special etc)
Permissions (read, write etc)
Owner
Group
File Size
File access, change and modification time (remember UNIX or Linux never stores file creation time, this is favorite question asked in UNIX/Linux sys admin job interview)
File deletion time
Number of links (soft/hard)
Extended attribute such as append only or no one can delete file including root user (immutability)
Access Control List (ACLs)

Following command will be used to show inodes of file and folders:
ls -i

Following command will show complete info about any file or folders with inode number
stat file/folder

Files/Folders can also be deleted using inode numbers with following command:
find out the inode number using 'ls -il' command then run below command
find . -inum inode_number -exec rm -i {} \;

More Questions & Answers:-
Page1 Page2 Page3 Page4 Page5 Page6 Page7 Page8 Page9 Page10 Page11

No comments:

Post a Comment