L1 / L2 Linux System Admin Interview Questions – Part I

Ques 1 : – How to increase disk read performance from single command in Linux ?

Ans : – In Linux like Operating System the Read performance of a Disk can be improved by increasing a parameter called “Read+Ahead” using ‘blockdev’ command. By default the Linux OS will read 128 KB of data in advance so that it is already in Memory cache before the program needs it. This value can be increased so as to get better Read Performance.

Example :

# blockdev –setra 16384 /dev/sda

Ques 2 : – What is the use of tmfs File System ?

Ans : – Tmpfs is a file system which keeps all files in virtual memory. Everything in tmpfs is temporary in the sense that no files will be created on your hard drive. If you unmount a tmpfs instance, everything stored therein is lost.

tmpfs puts everything into the kernel internal caches and grows and shrinks to accommodate the files it contains and is able to swap unneeded pages out to swap space. It has maximum size limits which can be adjusted on the fly via ‘mount -o remount …’

Ques 3 : – What is anacron and its usage ?

Ans : – Anacron is a service that runs after every system reboot, checking for any cron and at scheduled jobs that were to run while the system was down and hence, have not yet run. It scans the /etc/cron.hourly/0anacron file for three factors to determine whether to run these missed jobs. The three factors are the presence of the /var/spool/anacron/cron.daily file, the elapsed time of 24 hours since anacron last ran, and the presence of the AC power to the system. If all of the three factors are affirmative, anacron goes ahead and automatically executes the scripts located in the /etc/cron.daily, /etc/cron.weekly, and /etc/cron.monthly directories, based on the settings and conditions defined in anacron’s main configuration file /etc/anacrontab

Ques 4 : – What is difference between Soft Link & Hard Link ?

Ans : – A soft link (symbolic link or a symlink) makes it possible to associate one file with another. It is similar to a shortcut in MS Windows where the actual file is resident somewhere in the directory structure but you may have multiple shortcuts or pointers with different names pointing to it. Each soft link has a unique inode number.A soft link can cross file system boundaries and can be used to link directories.

A hard link associates two or more files with a single inode number. This allows the files to have identical permissions, ownership, time stamp, and file contents. Changes made to any of the files are reflected on the other linked files. All files actually contain identical data.A hard link cannot cross file system boundaries and cannot be used to link directories.

Ques 5 : – What is the difference between hardware RAID and Software RAID?

Ans : – The hardware-based RAID is independent from the host. A Hardware RAID device connects to the SCSI controller and presents the RAID arrays as a single SCSI drive. An external RAID system moves all RAID handling “intelligence” into a controller located in the external disk subsystem. The whole subsystem is connected to the host via a normal SCSI controller and appears to the host as a single disk.

Software RAID is implemented under OS Kernel level. The Linux kernel contains an MD driver that allows the RAID solution to be completely hardware independent. The performance of a software-based array depends on the server CPU performance and load.

Ques 6 : – Explain the command “rpm -qf “?

Ans : – it queries the RPM database for which package owns . When specifying a file, specify the absolute path of the file.

Ques 7. What is initrd image and what is its function in the linux booting process ?

Ans : The initial RAM disk (initrd) is an initial root file system that is mounted prior to when the real root file system is available.The initrd is bound to the kernel and loaded as part of the kernel boot procedure. The kernel then mounts this initrd as part of the two-stage boot process to load the modules to make the real file systems available and get at the real root file system. Thus initrd image plays a vital role in linux booting process.

Ques 8. Explain the terms suid, sgid and sticky bit ?

Ans : In addition to the basic file permissions in Linux, there are few special permissions that are available for executable files and directories.

SUID : If setuid bit is set, when the file is executed by a user, the process will have the same rights as the owner of the file being executed.

SGID : Same as above, but inherits group previleges of the file on execution, not user previleges. Similar way when you create a file within directory,it will inherit the group ownership of the directories.

Sticky bit : Sticky bit was used on executables in linux so that they would remain in the memory more time after the initial execution, hoping they would be needed in the near future. But mainly it is on folders, to imply that a file or folder created inside a stickybit enabled folder could only be deleted by the owner. A very good implementation of sticky bit is /tmp ,where every user has write permission but only users who own a file can delete them.

Ques 9. List out few of the differences between Softlink and Hardlink ?

Ans : a) Hardlink cannot be created for directories. Hard link can only be created for a file.

b) Symbolic links or symlinks can link to a directory.

c) Removing the original file that your hard link points to does not remove the hardlink itself; the hardlink still provides the content of the underlying file.

d) If you remove the hard link or the symlink itself, the original file will stay intact.

e) Removing the original file does not remove the attached symbolic link or symlink, but without the original file, the symlink is useless

Ques 10. How do you sent a mail attachment via bash console ?

“mutt” is an opensource tool for sending emails with attachments from the linux bash command line. We can install “mutt” from the binary rpm or via packagemanager.

For Ubuntu / Debian based destros.

# apt-get install mutt

For Redhat / Fedor based destros,

# yum install mutt

Usage :

# mutt -s "Subject of Mail" -a "path of attachment file" "email address of recipient" < "message text containing body of the message"

Eg :

 mutt -s "Backup Data" -a /home/backup.tar.gz admin@mywebsite.com < /tmp/message.txt

80 thoughts on “L1 / L2 Linux System Admin Interview Questions – Part I

  1. Pingback: cheap oakleys

  2. Pingback: true religion womens becca bootcut

  3. Pingback: ray ban sunglasses

  4. Pingback: oakley sunglasses

  5. Pingback: parka woolrich

  6. Pingback: oakley sunglasses cheap

  7. Pingback: human hair

  8. Pingback: louis vuitton salg

  9. Pingback: roger vivier shoes

  10. Pingback: louis vuitton norge

  11. Pingback: parajumpers norge

  12. Pingback: wholsale nike nfl jerseys

  13. Pingback: Oakley Sunglasses

  14. Pingback: parajumpers salg

  15. Pingback: cheap nike nfl jersyes

  16. Pingback: louis vuitton vesker

  17. Pingback: fifa 16 coins

  18. Pingback: moncler cardigan

  19. Pingback: goyard bags uk price

  20. Pingback: purple ugg boots tall

  21. Pingback: Hermes Birkin Prezzo

  22. Pingback: Hermes Birkin Bag

  23. Pingback: Hermes Online Outlet

  24. Pingback: Hermes Birkin Price

  25. Pingback: Hermes Birkin Replica

  26. Pingback: Hermes Outlet

  27. Pingback: Hermes Kelly Bag 32 Outlet

  28. Pingback: Cheap Moncler Jackets

  29. Pingback: オメガ スーパーコピー

  30. Pingback: christian louboutin replica

  31. Pingback: Christian Louboutin Replica

  32. Pingback: Cheap Ray Ban Sunglasses

  33. Pingback: w88.com优德

  34. Pingback: roger vivier online

  35. Pingback: レプリカ時計

  36. Pingback: スーパーコピー時計

  37. Pingback: スーパーコピー時計

  38. Pingback: バーバリー ベビー 毛布

  39. Pingback: ブランド財布コピー

  40. Pingback: レプリカ時計

  41. Pingback: ブランドバッグコピー

  42. Pingback: レプリカ時計

  43. Pingback: 激安ブランドコピー

  44. Pingback: smart balance wheel

  45. Pingback: ノースフェイス メンズ タイツ

  46. Pingback: パネライ 外国人

  47. Pingback: 札幌 ロレックス 販売

  48. Pingback: エルメス ピコタン コーディネート

  49. Pingback: シャネル コインケース コピー

  50. Pingback: ルイヴィトン ダミエ エベヌ

  51. Pingback: カサブランカ 時計 中古

  52. Pingback: electric scooter

  53. Pingback: 時計 チュードル

  54. Pingback: シャネル ヘアクリップ 通販

  55. Pingback: バーバリー バッグ レディース ブルー

  56. Pingback: バーバリー ロンドン テーラードジャケット

  57. Pingback: シャネル 化粧品 新作 ネイル

  58. Pingback: レ ジェネヴェ 時計

  59. Pingback: プロフェッショナル 料理

  60. Pingback: エルメス ピコタン風 リボン

  61. Pingback: 【wit】クロムハーツ ローラーウォレットチェーン 12リンクroller wallet chain12 link

  62. Pingback: フルラ 池袋東武

  63. Pingback: バッグ 黄色 斑点

  64. Pingback: コーチ ショルダー 斜め掛け

  65. Pingback: セリーヌ ハンドバッグ マカダム

  66. Pingback: シャネル エンゲージリング

  67. Pingback: ジバンシー バッグ 大阪

  68. Pingback: ベルト メンズ ジーンズ

  69. Pingback: ヴィトンの新作バッグ

  70. Pingback: バッグ コーチ レディース ショルダー

  71. Pingback: electric scooter

  72. Pingback: electric scooter

  73. Pingback: maccosmeticswholesaleoutlet mac lipstick wholesale c

  74. Pingback: maccosmeticswholesalers mac makeup lip balm c 38

  75. Pingback: モンクレール ダウン アウトレット2014

  76. Pingback: パネライ ラジオミール フォドロヤンテ i番 pam00246 panerai

  77. Pingback: 澶у瀷閬婂叿

  78. Pingback: maccosmeticswholesaleoutlet too faced makeup c 23

  79. Pingback: maccosmeticswholesaleoutlet new mac cosmetics 2016 c

  80. Pingback: ForexDicas mac cosmetics men Real Good Quality On Sale Free Shipping LNZsIlYRmT

Leave a Reply