Linux File Systems Interview Questions & Answers

  1. Question 1. What Is The Command To View All The Variables In Your System?

    Answer :


  2. Question 2. What Is The Command To View All The Kernel Parameters?

    Answer :

    sysctl -a

  3. Linux Embedded systems Interview Questions

  4. Question 3. What Is The Default Permission Applied On The User When You Mount A Nfs Permission On Any Local Directory In Your System?

    Answer :

    No user permission which is a system account in all the machines having normal user level privileges unless no_root_squash or any other permission specification is not provided on the share.

  5. Question 4. What Is The Difference Between Nfs Share And A Samba Share?

    Answer :

    NFS sharing is done between linux to Linux where Samba sharing can be done between Linux-Linux and Linux-windows

  6. Linux Embedded systems Tutorial

  7. Question 5. What Is The Command To Display All The Logical Volume Available In The System?

    Answer :


  8. Red Hat Linux Essentials Interview Questions

  9. Question 6. What Does The Last Two Sections Define In Fstab File?

    Answer :

    • The 5th column tells the dump information if whether the partition has to be backed up. It it is “0” the filesystem will be ignored
    • The 6th column tells the order in which fsck command would check the filesystem on boot. If it is “0” then fsck won’t check the filesystem
  10. Question 7. Explain The Procedure To Fix A Case When A System Is Unable To Boot Due To Improper Entry In Fstab?

    Answer :

    Boot into single user mode and make the necessary corrections inside fstab

  11. Unix/Linux Tutorial
    Red Hat Linux System Administration Interview Questions

  12. Question 8. What Is The Default Mode When You Enter Single User Mode?

    Answer :

    Read only for the first time but once you change it to read write then from next time onward it will be read write.

  13. Question 9. How Do You Make Permanent Changes To Any File Inside /proc Directory?

    Answer :

    sysctl -p

  14. Ubuntu Certified Professional Interview Questions

  15. Question 10. What Is The Use Of Mtab Directory?

    Answer :

    It contains a list of all the mounted directories or partitions on the system.

  16. Question 11. What Is The Command To View All The Mounted Partitions On The System?

    Answer :


  17. IBM AIX Interview Questions

  18. Question 12. What Is The Command To View All The Available Partitions On The System?

    Answer :

    fdisk -l

  19. Linux Embedded systems Interview Questions

  20. Question 13. What Is The Procedure You Follow To Extend A Lvm Partition?

    Answer :

    lvextend -L +1G /dev/VolGroup/LogVol1

    This will extend the partition size by +1 GB

    resize2fs /dev/VolGroup/LogVol1

  21. Question 14. What Is A Swap Partition ? What Is The Recommended Swap Partition For 8 Gb Ram?

    Answer :

    Swap partition is a feature used in Linux which uses the space allocated to it from the physical hard drive and is utilized by te system when RAM memory goes full.

    • Amount of RAM in the System  Recommended Amount of Swap Space
    • 4GB of RAM or less  a minimum of 2GB of swap space
    • 4GB to 16GB of RAM  a minimum of 4GB of swap space
    • 16GB to 64GB of RAM  a minimum of 8GB of swap space
    • 64GB to 256GB of RAM  a minimum of 16GB of swap space
    • 256GB to 512GB of RAM  a minimum of 32GB of swap space
  22. Question 15. What Is The Command Used To Check Any Hardware Changes Made On The System In Linux?

    Answer :


  23. Solaris Interview Questions

  24. Question 16. What Is The Difference Between Ext3 And Ext4 Filesystem?

    Answer :


    • Maximum individual file size can be from 16 GB to 2 TB
    • Overall ext3 file system size can be from 2 TB to 32 TB


    • Maximum individual file size can be from 16 GB to 16 TB
    • Overall maximum ext4 file system size is 1 EB (exabyte). 1 EB = 1024 PB (petabyte). 1 PB = 1024 TB (terabyte).
  25. Question 17. What Is The Filesystem Used In Rhel 5 And Rhel 6?

    Answer :

    Ext3 for RHEL 5 and ext4 for RHEL 6.

  26. HP-ux 11iv3 system administration Interview Questions

  27. Question 18. What Is The Function Of Resize2fs Command?

    Answer :

    This can be used to change the size of an ext2 or ext3 filesystem.

  28. Red Hat Linux Essentials Interview Questions

  29. Question 19. What Is The Function Of Debugfs Command?

    Answer :

    This utility is used to to examine and debug an ext2 filesystem. This can also be used to manually verify the inode integrity and an aid to recover data.

  30. Question 20. What Is The Function Of Dump2fs Command?

    Answer :

    Provides a dump of file system information to standard out (Console). Can be redirected to a file.

  31. Red Hat cluster Interview Questions

  32. Question 21. What Is The Function Of Tune2fs Command?

    Answer :

    This is used to modify the filesystem attributes (Like converting ext2 to ext3).

  33. Question 22. Types Of Journals And Their Function?

    Answer :

    • Ordered : This is the default and journal only meta-data
    • Journaled : Journals data and meta-data
    • Writeback : Journal updates are not atomic.
  34. Question 23. What Is E2fsck Command?

    Answer :

    fsck is a front end tool for e2fsck.

  35. Embedded C Interview Questions

  36. Question 24. When The System Runs The Fsck And Which Script Invokes It?

    Answer :

    When the system boots,  the rc.sysinit script runs the fsck on any filesystems marked for checking in /etc/fstab file. If any of these filesystems are markes as dirty or have data in the journal, fsck will attempt to repair them. If it succeeds, the filesystems will be mounted and boot process continues, else rc.sysinit will  run sulogin and will report that fsck needs to be run manually.

  37. Red Hat Linux System Administration Interview Questions

  38. Question 25. Why Fsck Used?

    Answer :

    fsck (file system check) is used to maintain file system consistency.

  39. Question 26. How To Create A Swap File?

    Answer :

    Create a file as:

             # dd  if=/dev/zero  of=swapfile   bs=512  count=N
             (Where N is the file size in KB)
             Run the mkswap to create signature
             Activate the swap file with swapon command (OR) initialize it in the startup
             script /etc/rc.d/rc.local

  40. Unix/Linux Interview Questions

  41. Question 27. How To Set Up Swap Partition?

    Answer :

    Steps involved in setting up swap partition:

    • Create a partition using a partitioning program (fdisk/sfdisk/parted) 
    • Set partition id type to 0x82.       
    • Create the signature on the partition using the mkswap command
    • # mkswap  -v1  /dev/hdb3
    • Add an entry for the swap in /etc/fstab file as:
    • /dev/hdb3   swap   swap   defaults    0   0
    • Activate the swap partition using
    • # swapon -a
    • Check the swap partition status using
    • # swapon  -s
  42. Ubuntu Certified Professional Interview Questions

  43. Question 28. What Is Swap Space?

    Answer :

    Swap space is supplement to system RAM.

  44. Question 29. How To Change The Ext2/ext3 File System Attributes?

    Answer :

    chattr command changes the file attributes.

  45. Unix Shell Scripting Interview Questions

  46. Question 30. How To List The Ext2/ext3 Filesystem Attributes?

    Answer :

    lsattr  command displays file attributes

  47. Question 31. What Is The Function Of /etc/fstab?

    Answer :

    This file is referenced each time the system boots to create the desired filesystem hierarchy.

  48. Question 32. How To Display The Label For A Device (/dev/hdb2)?

    Answer :

    # e2lable  /dev/hdb2

  49. Solaris Administrator Interview Questions

  50. Question 33. What Is The Function Of E2label Command?

    Answer :

    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 on the filesystem on partition /dev/hda3.

  51. IBM AIX Interview Questions

  52. Question 34. How To View Only The Mounted Filesystems?

    Answer :

    Use the df -k command, which shows only mounted filesystems but has the big advantage of giving you the mount points too.

  53. Question 35. How To View All The Mounted And Unmounted Partitions?

    Answer :

    Use the fdisk -l command to view all the mounted and unmounted filesystems available on your system.

  54. Question 36. How To Kill All Actions On A Filesystem?

    Answer :

    # fuser  -km  mnt_point

  55. Solaris Interview Questions

  56. Question 37. How To Display Who/what Is Acting On A Filesystem?

    Answer :

    # fuser  -v  mnt_point

  57. Question 38. Which Command Is Used To Display Information About The Processes Using A Filesystem?

    Answer :

    The fuser command is used.

  58. Question 39. How To Disconnect A Filesystem From A Linux Box?

    Answer :

    The umount command is used.

  59. Question 40. Which Filesystem Is Referred By Mount When Displaying Mounted & Available Filesystems?

    Answer :

    When mount command is invoked without any arguments it referes to the /etc/mtab filesystem.

  60. HP-ux 11iv3 system administration Interview Questions

  61. Question 41. How To Find Currently Mounted And Available Filesystems?

    Answer :

    Use mount command without arguments.

  62. Question 42. How To Connect A File System To A Linux Box?

    Answer :

    Mount command is used.

  63. Red Hat cluster Interview Questions

  64. Question 43. How To Convert An Ext2 Filesystem To Ext3?

    Answer :

     Change the /etc/fstab to specify ext3 for desired filesystem(s)
                Create the ext3 journal on the ext2 filesystem(s) as:
                # tune2fs  -j 
                If the kernel needs to have access to the ext3 module at boot time, create  a new initial ramdisk as:
                # mkinitrd  /boot/initrd-.img

  65. Question 44. What Are The Journaling Modes Supported By Ext3 Filesystem?

    Answer :

    • Ordered>Journals only metadata (This is the default)
    • Journaled>Journals data as well as metadata
    • Writeback> Journal updates are not atomic, but this gives better performance.
  66. Question 45. What Is The Difference Between Ext2 And Ext3 Filesystem?

    Answer :

    ext3 filesystem supports journaling, where as ext2 does not.

  67. Question 46. How To Create A Filesystem?

    Answer :

    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
  68. Question 47. What Is The Function Of Partprobe?

    Answer :

    Reinitializes the kernel’s in memory copy of the partition table.

  69. Question 48. What Are The Tools Used To Create Or Manage Partitions?

    Answer :

    • fdisk
    • sfdisk
    • parted (GNU) – An advanced partition manipulation tool (create, copy,resize etc.)
  70. Question 49. Why Partitions Required?

    Answer :

    Separate partitions improve performance by keeping data together which reduces the disk head seek.

  71. Question 50. How Many Partitions Are Supported By Linux?

    Answer :

    The maximum number of partitions supported by Linux kernel is:

    • 63 for IDE drives
    • 15 for SCSI drives