Categories
Linux Interview questions

Linux interview questions

  Q: Explain the role of a UDEV daemon?

Udev is the device manager for the  Linux kernel. Primarily it managed device nodes in /dev directory.

The system is divided into 3 parts

The library ‘libudev’, that allows access to  device information.

The daemon udevd, in user space, that manages the virtual /dev

The administrative command udevadm for diagnostics

  Q: What does the /etc/skel directory contains?

When the home directory for a new user is created, it is initialized with files from   the/etc/skel directory. The system administrator can create files in /etc/skel that will provide a nice default environment for users. For example, he might create a /etc/skel/.profilethat sets the EDITOR environment variable to some editor that is friendly towards new users.

Q: Give more info about ext4 filesystems?

The ext4 or the fourth extended filesystem is a journaling filesystem for linux, developed as a successor of ext3.

Features

  • Large filesystem: the ext4 can support volume sizes upto 1 exbibyte(EiB) and files with sizes upto 16 tebibytes(TiB).
  • Extents: Extents replace the traditional block mapping scheme used in ext2/3 filesystems. An extent is a range of contiguous physical blocks,               improving large filesystem performance and reducing fragmentation.
  • Breaking 32000 subdirectory limit
  • Faster filesystem caching.
  • Improved timestamps.

Note: for more information check this wikilink

Q: How do we create a ext 3 & ext 4 file system?

creating an ext4 filesystem

#mkfs.ext4 /dev/device

creating an ext3 filesystem

#mkfs.ext3 /dev/device

 

Q: Can we convert ext2 to ext3 filesystem?

Yes, it is possible. For this to happen you need ext4 patch applied into the kernel with ext4 support. Once done type the following command to convert an existing ext3 filesystem to ext4

#tune2fs -O extents,uninit_bg,dir_index /dev/dev-name

eg:

#umount /dev/sdb1

#tune2fs -O extents,uninit_bg,dir_index /dev/sdb1

after that run fsck

#fsck -pf  /dev/sdb1

Mounting a ext4 partition

mount -t ext4 /dev/sdb1 /path

Leave a Reply

Your email address will not be published. Required fields are marked *