101-400 Practice Questions
Prepare for 101-400 with more than an answer.
Unlock the full exam and previous versions
- v1Standard 225 questions Locked
- 101-400Legacy LPIC-1 Exam 101 v4.0 169 questions Current
- 1
What command changes the nice level of a running process?
Show answer details
Correct answer: A
The renice command modifies the nice value of already running processes, unlike nice which sets priority only at process startup. Renice requires the process ID (PID) and new nice value. Regular users can only increase nice values (lower priority), while root can set any value. Priority, newnice, and chnice are not valid Linux commands.
- 2
Which of the following commands is used to modify quota settings? (Choose two.)
Show answer details
Correct answer: B, E
Both edquota and setquota commands modify user and group disk quota settings in Linux. The edquota command opens an interactive editor (usually vi) to modify quota limits, while setquota allows command-line quota modification with specific parameters. Other commands like quotaon enable quotas and repquota reports usage, but they do not modify quota limits.
Both edquota and setquota commands modify user and group disk quota settings in Linux. The edquota command opens an interactive editor (usually vi) to modify quota limits, while setquota allows command-line quota modification with specific parameters. Other commands like quotaon enable quotas and repquota reports usage, but they do not modify quota limits.
- 3
Which of the following commands will display the inode usage of each mounted filesystem?
Show answer details
Correct answer: C
The df -i command displays inode usage statistics for mounted filesystems, showing total inodes, used inodes, available inodes, and usage percentage. This is essential for diagnosing filesystems that are full due to inode exhaustion rather than disk space. Standard df shows disk space, while du shows directory usage, and fsck checks filesystem integrity.
- 4
Which of the following Linux filesystems preallocates a fixed number of inodes at the filesystem's make/creation time and does NOT generate them as needed? (Choose TWO correct answers.)
Show answer details
Correct answer: C, E
Both ext2 and ext3 filesystems preallocate a fixed number of inodes during filesystem creation and cannot generate new inodes dynamically. The inode count is determined by filesystem size and inode ratio settings during mkfs execution. Newer filesystems like XFS and Btrfs can allocate inodes dynamically as needed, but traditional ext filesystems have static inode tables.
Both ext2 and ext3 filesystems preallocate a fixed number of inodes during filesystem creation and cannot generate new inodes dynamically. The inode count is determined by filesystem size and inode ratio settings during mkfs execution. Newer filesystems like XFS and Btrfs can allocate inodes dynamically as needed, but traditional ext filesystems have static inode tables.
- 5
Which command is used in a Linux Environment to create a new directory?
Show answer details
Correct answer: B
The mkdir command creates new directories and is located at /usr/bin/mkdir (not /user/bin/mkdir as shown). It can create single directories or directory trees with -p option for parent directories. The command accepts both relative and absolute paths. Touch creates files, cd changes directories, and pwd prints working directory.
- 6
Which of the following options is used in a GRUB Legacy configuration file to define the amount of time that the GRUB menu will be shown to the user?
Show answer details
Correct answer: A
The timeout directive in GRUB Legacy configuration (/boot/grub/menu.lst) specifies how many seconds the boot menu is displayed before automatically booting the default entry. This allows users time to select alternate kernels or boot options. Other options like splash control boot screen appearance, while showmenu and hidemenu control menu visibility but not timing.
- 7
When starting a program with the nice command without any additional parameters, which nice level is set for the resulting process?
Show answer details
Correct answer: B
When executing the nice command without parameters, it sets the nice level to 10, which lowers the process priority slightly. Nice values range from -20 (highest priority) to 19 (lowest priority), with 0 being the default. Only root can set negative nice values. The value 10 makes the process less competitive for CPU time.
- 8
Which of the following commands print the current working directory when using a Bash shell? (Choose two.)
Show answer details
Correct answer: D, E
Both pwd command and the PWD environment variable (accessed via echo "${PWD}") display the current working directory in Bash shell. The pwd command is a built-in that directly prints the current path, while PWD is automatically maintained by the shell to track directory changes. Other commands like printwd do not exist, and ${pwd} would be empty since it is not a predefined variable.
Both pwd command and the PWD environment variable (accessed via echo "${PWD}") display the current working directory in Bash shell. The pwd command is a built-in that directly prints the current path, while PWD is automatically maintained by the shell to track directory changes. Other commands like printwd do not exist, and ${pwd} would be empty since it is not a predefined variable.
- 9
Creating a hard link to an ordinary file returns an error. What could be the reason for this?
Show answer details
Correct answer: D
Hard links cannot span different filesystems because they reference inodes, which are filesystem-specific. When source and target are on different filesystems, the ln command fails since the inode number would be meaningless across filesystem boundaries. Use symbolic links for cross-filesystem linking. File type, permissions, or existing links do not prevent hard link creation.
- 10
Instead of supplying an explicit device in /etc/fstab for mounting, what other options may be used to identify the intended partition? (Choose TWO correct answers.)
Show answer details
Correct answer: B, E
Instead of device names like /dev/sdb1, Linux /etc/fstab supports UUID (Universally Unique Identifier) and LABEL identifiers for partition mounting. UUID provides persistent identification regardless of device name changes, while LABEL uses human-readable filesystem labels. Both methods are more reliable than device names since disk detection order can change between boots, potentially altering device assignments.
Instead of device names like /dev/sdb1, Linux /etc/fstab supports UUID (Universally Unique Identifier) and LABEL identifiers for partition mounting. UUID provides persistent identification regardless of device name changes, while LABEL uses human-readable filesystem labels. Both methods are more reliable than device names since disk detection order can change between boots, potentially altering device assignments.
