Top 50 Linux File Systems Interview Questions
Q1. What Is The Command To View All The Variables In Your System?
Set
Q2. What Is The Filesystem Used In Rhel five And Rhel 6?
Ext3 for RHEL five and ext4 for RHEL 6.
Q3. Which Filesystem Is Referred By Mount When Displaying Mounted & Available Filesystems?
When mount command is invoked without any arguments it referes to the /and many others/mtab filesystem.
Q4. What Is The Difference Between Ext2 And Ext3 Filesystem?
Ext3 filesystem helps journaling, in which as ext2 does not.
Q5. What Is E2fsck Command?
Fsck is a the front cease tool for e2fsck.
Q6. How To View Only The Mounted Filesystems?
Use the df -ok command, which shows simplest installed filesystems but has the big advantage of providing you with the mount factors too.
Q7. How To Create A Filesystem?
The mkfs command is used to create the filesystem.
Mkfs.Ext2 / mkfs.Ext3>To create ext2/ext3 filesystem
mkfs.Minix> minix filesystem
mkfs.Msdos> MS-DOS filesystem
Q8. What Is The Function Of Resize2fs Command?
This may be used to exchange the size of an ext2 or ext3 filesystem.
Q9. Why Fsck Used?
Fsck (file gadget take a look at) is used to keep file system consistency.
Q10. What Is The Command To View All The Available Partitions On The System?
Fdisk -l
Q11. How To Disconnect A Filesystem From A Linux Box?
The umount command is used.
Q12. What Is The Default Permission Applied On The User When You Mount A Nfs Permission On Any Local Directory In Your System?
No user permission that is a gadget account in all of the machines having ordinary user stage privileges until no_root_squash or some other permission specification isn't always supplied on the percentage.
Q13. Which Command Is Used To Display Information About The Processes Using A Filesystem?
The fuser command is used.
Q14. Types Of Journals And Their Function?
Ordered : This is the default and journal best meta-information
Journaled : Journals information and meta-data
Writeback : Journal updates aren't atomic.
Q15. What Is The Default Mode When You Enter Single User Mode?
Read most effective for the primary time however once you exchange it to examine write then from next time onward it will likely be examine write.
Q16. Why Partitions Required?
Separate partitions improve overall performance by way of maintaining data collectively which reduces the disk head are searching for.
Q17. What Are The Tools Used To Create Or Manage Partitions?
Fdisk
sfdisk
parted (GNU) - An advanced partition manipulation device (create, copy,resize and so forth.)
Q18. What Is The Command To View All The Kernel Parameters?
Sysctl -a
Q19. What Are The Journaling Modes Supported By Ext3 Filesystem?
Ordered>Journals most effective metadata (This is the default)
Journaled>Journals information as well as metadata
Writeback> Journal updates aren't atomic, but this offers better performance.
Q20. What Is The Use Of Mtab Directory?
It incorporates a listing of all of the mounted directories or partitions at the system.
Q21. How To Convert An Ext2 Filesystem To Ext3?
Change the /and so on/fstab to specify ext3 for desired filesystem(s)
Create the ext3 journal at the ext2 filesystem(s) as:
# tune2fs -j
If the kernel desires to have get entry to to the ext3 module at boot time, create a new preliminary ramdisk as:
# mkinitrd /boot/initrd-.Img
Q22. What Is The Difference Between Nfs Share And A Samba Share?
NFS sharing is achieved among linux to Linux wherein Samba sharing can be done among Linux-Linux and Linux-windows
Q23. How To Set Up Swap Partition?
Steps concerned in setting up swap partition:
Create a partition the use of a partitioning program (fdisk/sfdisk/parted)
Set partition identity kind to 0x82.
Create the signature on the partition the usage of the mkswap command
# mkswap -v1 /dev/hdb3
Add an access for the change in /and so forth/fstab document as:
/dev/hdb3 change change defaults zero 0
Activate the switch partition the use of
# swapon -a
Check the swap partition status the use of
# swapon -s
Q24. How To Find Currently Mounted And Available Filesystems?
Use mount command without arguments.
Q25. How To View All The Mounted And Unmounted Partitions?
Use the fdisk -l command to view all the mounted and unmounted filesystems available to your device.
Q26. How To Kill All Actions On A Filesystem?
# fuser -km mnt_point
Q27. Explain The Procedure To Fix A Case When A System Is Unable To Boot Due To Improper Entry In Fstab?
Boot into single user mode and make the essential corrections inside fstab
Q28. What Is The Function Of Debugfs Command?
This application is used to to take a look at and debug an ext2 filesystem. This can also be used to manually confirm the inode integrity and an useful resource to get better statistics.
Q29. How To Change The Ext2/ext3 File System Attributes?
Chattr command adjustments the file attributes.
Q30. How To Display Who/what Is Acting On A Filesystem?
# fuser -v mnt_point
Q31. What Is The Function Of E2label Command?
With the help of e2label command a filesystem label can be written into the superblock of ext2/ext3 filesystem.
Eg:- #e2label /dev/hda3 datadisk3
Will create a label of datadisk3 at the filesystem on partition /dev/hda3.
Q32. How To Create A Swap File?
Create a report as:
# dd if=/dev/0 of=swapfile bs=512 depend=N
(Where N is the record length in KB)
Run the mkswap to create signature
Activate the switch file with swapon command (OR) initialize it in the startup
script /and many others/rc.D/rc.Nearby
Q33. What Is The Function Of Partprobe?
Reinitializes the kernel's in memory reproduction of the partition desk.
Q34. When The System Runs The Fsck And Which Script Invokes It?
When the device boots, the rc.Sysinit script runs the fsck on any filesystems marked for checking in /and many others/fstab report. If any of those filesystems are markes as grimy or have facts in the magazine, fsck will try to repair them. If it succeeds, the filesystems might be established and boot manner continues, else rc.Sysinit will run sulogin and will document that fsck desires to be run manually.
Q35. What Is The Procedure You Follow To Extend A Lvm Partition?
Lvextend -L +1G /dev/VolGroup/LogVol1
This will increase the partition size by +1 GB
resize2fs /dev/VolGroup/LogVol1
Q36. What Is The Difference Between Ext3 And Ext4 Filesystem?
Ext3
Maximum character report size can be from sixteen GB to 2 TB
Overall ext3 document device size may be from 2 TB to 32 TB
Ext4
Maximum person document length can be from 16 GB to 16 TB
Overall maximum ext4 file machine size is 1 EB (exabyte). 1 EB = 1024 PB (petabyte). 1 PB = 1024 TB (terabyte).
Q37. How Many Partitions Are Supported By Linux?
The most variety of walls supported by using Linux kernel is:
sixty three for IDE drives
15 for SCSI drives
Q38. How To Display The Label For A Device (/dev/hdb2)?
# e2lable /dev/hdb2
Q39. What Is The Command To View All The Mounted Partitions On The System?
Mount
Q40. What Is The Command Used To Check Any Hardware Changes Made On The System In Linux?
Kudzu
Q41. What Is Swap Space?
Swap space is complement to machine RAM.
Q42. How To List The Ext2/ext3 Filesystem Attributes?
Lsattr command presentations record attributes
Q43. How Do You Make Permanent Changes To Any File Inside /proc Directory?
Sysctl -p
Q44. What Is The Function Of Tune2fs Command?
This is used to adjust the filesystem attributes (Like changing ext2 to ext3).
Q45. What Is The Function Of /and so on/fstab?
This file is referenced on every occasion the device boots to create the preferred filesystem hierarchy.
Q46. What Is A Swap Partition ? What Is The Recommended Swap Partition For eight Gb Ram?
Swap partition is a function utilized in Linux which makes use of the gap allotted to it from the bodily difficult force and is used by te machine while RAM memory is going complete.
Amount of RAM in the System Recommended Amount of Swap Space
4GB of RAM or much less no less than 2GB of switch space
4GB to 16GB of RAM not less than 4GB of switch space
16GB to 64GB of RAM not less than 8GB of switch area
64GB to 256GB of RAM not less than 16GB of switch area
256GB to 512GB of RAM a minimum of 32GB of swap space
Q47. What Is The Command To Display All The Logical Volume Available In The System?
Lvdisplay
Q48. What Does The Last Two Sections Define In Fstab File?
The fifth column tells the dump statistics if whether or not the partition must be backed up. It it's far "zero" the filesystem may be ignored
The sixth column tells the order wherein fsck command might check the filesystem on boot. If it's far "0" then fsck won't test the filesystem
Q49. What Is The Function Of Dump2fs Command?
Provides a sell off of report machine statistics to standard out (Console). Can be redirected to a record.
Q50. How To Connect A File System To A Linux Box?
Mount command is used.

