0% found this document useful (0 votes)
67 views

Linux Interview Questions Part4

This document provides answers to common Linux interview questions. It begins with brief explanations of topics like GRUB, the Linux boot process, default user profile files, and how to change the default runlevel. It then lists 25 interview questions and their answers covering additional topics like inodes, disk performance tuning, password expiration, network configuration files, link types, restricted file insertion, process monitoring and more. The questions assess knowledge of basic Linux system administration and troubleshooting.

Uploaded by

Bharath
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
67 views

Linux Interview Questions Part4

This document provides answers to common Linux interview questions. It begins with brief explanations of topics like GRUB, the Linux boot process, default user profile files, and how to change the default runlevel. It then lists 25 interview questions and their answers covering additional topics like inodes, disk performance tuning, password expiration, network configuration files, link types, restricted file insertion, process monitoring and more. The questions assess knowledge of basic Linux system administration and troubleshooting.

Uploaded by

Bharath
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

WELCOME LINUX INTERVIEW QUESTION

ABOUT MEREDHATLINUX NEWSINTERVIEW QUESTION ANSWERASK QUESTIONEXT2 to EXT3 and EXT3


to EXT4 Converting without data eraseManage Partition in linuxHow To Configure FTP
ServerHow To Create Yum Server1. Basic Question Answer2.LINUX GENERAL QUESTION AND
ANSWER3. Linux Interview Questions Along With Answers -4. Linux IPC Questions and
Answers:5. Linux OS Questions and Answers6. Linux Socket Programming Questions and
Answers7. Linux Threads Questions and Answers8. Linux System Calls Questions and
Answers
3. Linux Interview Questions Along With Answers -
Linux Interview Questions Along With Answers -
1) What is GRUB
Ans 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 transferring 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) Explain Linux Boot Process
Ans http://www.thegeekstuff.com/2011/02/linux-boot-process/
3) Which files are called for user profile by default when a user gets login
Ans $HOME/.bash_profile, $HOME/.bash_bashrc
4) Which file needs to update if srequired to change default runlevel 5 to 3
Ans File is /etc/inittab and required to change below lines:
id:5:initdefault: to id:3:initdefault:
5) What command used for showing user info like Login Name, Canonical Name, Home
Directory,Shell etc..
Ans FINGER command can be used i.g; finger username

6) What is inode number


Ans 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 {} \;
7) How can we increase disk read performance in single command
Ans blockdev command
This is sample output - yours may be different.
# Before test
$ blockdev --getra /dev/sdb
256
$ time dd if=/tmp/disk.iso of=/dev/null bs=256k
2549+1 records in
2549+1 records out
668360704 bytes (668 MB) copied, 6,84256 seconds, 97,7 MB/s
real 0m6.845s
user 0m0.004s
sys 0m0.865s
# After test
$ blockdev --setra 1024 /dev/sdb
$ time dd if=/tmp/disk.iso of=/dev/null bs=256k
2435+1 records in
2435+1 records out
638390272 bytes (638 MB) copied, 0,364251 seconds, 1,8 GB/s
real 0m0.370s
user 0m0.001s
sys 0m0.370s
8) .... command to change user password expiration time
Ans CHAGE
9) Command used to lock user password
Ans usermod -L username
10) How many default number of Shells available and what are their names?
Ans SH, BASH, CSH, TCSH, NOLOGIN, KSH
11) Which file defines the attributes like UID, PASSWORD expiry, HOME Dir create or
not while
adding user
Ans /etc/login.defs
12) ...... command used for changing authentication of linux system to
LDAP/NIS/SMB/KERBOS
Ans authconfig
13) ...... command used for changing the attributes of any file
Ans chattr
14) What is the path of network (ethX) configuration files
Ans /etc/sysconfig/network-scripts/ethX
15) How can we change speed and make full duplex settings for eth0
Ans We can do this with below given 2 methods:
ethtool -s eth0 speed 100 duplex full
ethtool -s eth0 speed 10 duplex half
OR
mii-tool -F 100baseTx-HD
mii-tool -F 10baseT-HD
16) File which stores the DNS configuration
Ans /etc/resolve.conf
17) Main configuration file and command used for NFS enabling exported directories
and deamons
Ans /etc/exports and exportfs -av , deamons are quotad, portmapper, mountd, nfsd
and nlockmgr/status
18) What is command to check ports running/used over local machine
Ans netstat -antp
19) What is the command to check open ports at remote machine
Ans nmap
20) What is the difference between soft and hard links
Ans Soft Links => 1) Soft link files will have different inode numbers then source
file
2) If original file deleted then soft link file be of no use
3) Soft links are not updated
4) Can create links between directories
5) Can cross file system boundaries
Hard Links => 1) Hard links will have the same inode number as source file
2) Hard links can not link directories
3) Can not cross file system boundaries
4) Hard links always refers to the source, even if moved or removed

21) How to setup never expired user password


Ans chage -E never username
22) Restricting insertion into file if full permission are assigned to all
Ans chattr +i filename
23) Display or Kill all processes which are accessing any folder/file
Ans Display User who are using file/folder : fuser -u file/folder
Kill All Processes which are using file/folder: fuser -k file/folder
24) Kill any user's all processes
Ans killall -u username
25) How can we have system analysis and reports over mail
Ans Use logwatch

***********************************************************************************
****************************************

Home
Subscribe to: Posts (Atom)
Simple theme. Powered by Blogger.

You might also like