Q121
Q121 What does the mkfs command do in Linux?
Mounts a file system
Formats a disk
Checks disk usage
Creates a file system
Q122
Q122 Which command is used to create and manage disk partitions?
fdisk
mkfs
du
mount
Q123
Q123 How do you display detailed information about all block devices?
lsblk -f
lsblk -a
lsblk -l
lsblk -d
Q124
Q124 How do you mount a file system located at /dev/sda1 to the /mnt directory?
mount /dev/sda1 /mnt
mount /mnt /dev/sda1
mount -t /dev/sda1 /mnt
mount -a /dev/sda1 /mnt
Q125
Q125 A user reports that a partition is not available after a reboot.
Which file should be checked to ensure it mounts automatically?
/etc/fstab
/etc/mtab
/etc/passwd
/etc/rc.local
Q126
Q126 A file system is showing as read-only.
Which command can be used to remount it as read-write?
mount -o remount,ro /mount/point
mount -o remount,rw /mount/point
umount /mount/point
fsck /mount/point
Q127
Q127 Which command is used to change the permissions of a file in Linux?
chmod
chown
chgrp
passwd
Q128
Q128 What is the purpose of the sudo command?
To switch users
To execute a command with root privileges
To change file permissions
To monitor system logs
Q129
Q129 Which file stores user passwords in a hashed format for added security?
/etc/passwd
/etc/shadow
/etc/group
/etc/secure
Q130
Q130 What does setting the sticky bit on a directory do?
Allows users to read files
Allows users to execute files
Restricts file deletion to owners
Grants root privileges
Q131
Q131 How do you change the owner of a file named document.txt to a user named alice?
chown alice document.txt
chmod alice document.txt
chgrp alice document.txt
usermod alice document.txt
Q132
Q132 How do you grant execute permissions to the owner and group for a file named script.sh?
chmod u+x script.sh
chmod ug+x script.sh
chmod o+x script.sh
chmod g+x script.sh
Q133
Q133 A user is unable to modify a file despite having write permissions.
What could be the reason?
The file is read-only
The user is not the owner
The file has the immutable attribute set
The file is in use
Q134
Q134 A user is unable to delete a file in a directory with the sticky bit set.
What could be the reason?
The user does not have write permissions on the directory
The user is not the owner of the file
The file is read-only
The file is being used by another process
Q135
Q135 A file's permissions are set to rwxr-xr--.
What could be a potential security risk with these settings?
Unauthorized modification by others
Unauthorized execution by the group
Unauthorized reading by others
Unauthorized deletion by others
Q136
Q136 Which command is commonly used for creating backups in Linux?
cp
mv
tar
chmod
Q137
Q137 What is the purpose of the rsync command?
To synchronize files and directories between two locations
To compress files
To move files
To delete files
Q138
Q138 Which option with the tar command is used to create a new archive file?
-x
-c
-t
-v
Q139
Q139 What is the role of the dd command in backup and recovery?
To display disk usage
To copy and convert files at the byte level
To list directory contents
To manage disk partitions
Q140
Q140 How do you create a compressed archive of the /home/user directory using tar?
tar -cvf home.tar.gz /home/user
tar -xvf home.tar.gz /home/user
tar -czvf home.tar.gz /home/user
tar -tzvf home.tar.gz /home/user
Q141
Q141 How do you synchronize the /home/user directory with the /backup/user directory using rsync?
rsync -av /home/user /backup/user
rsync -z /home/user /backup/user
rsync -c /home/user /backup/user
rsync -t /home/user /backup/user
Q142
Q142 A user reports that a backup created with tar is not extracting correctly.
What could be the issue?
The archive file is corrupted
The file permissions are incorrect
The compression method is unsupported
The tar command is outdated
Q143
Q143 A user wants to automate daily backups of their home directory.
Which tool can help achieve this?
cron
rsync
tar
dd
Q144
Q144 What is the purpose of a cron job in Linux?
To monitor system performance
To schedule repetitive tasks
To manage user accounts
To compile code
Q145
Q145 What is the role of the crontab command?
To display system logs
To edit the cron table
To start a service
To check disk usage
Q146
Q146 Which special character is used in a crontab file to denote all valid values for a field?
*
?
-
,
Q147
Q147 How do you schedule a cron job to run a script at 2 AM every day?
0 2 * * * /path/to/script.sh
0 2 * * 1 /path/to/script.sh
2 0 * * * /path/to/script.sh
2 0 * * 1 /path/to/script.sh
Q148
Q148 How do you schedule a cron job to run every Monday at 5 PM?
0 17 * * 1 /path/to/script.sh
0 5 * * 1 /path/to/script.sh
0 17 * * * /path/to/script.sh
0 17 1 * * /path/to/script.sh
Q149
Q149 A user reports that their cron job is not executing.
Which command can be used to check the cron logs?
crontab -l
cronlog
grep cron /var/log/syslog
tail -f /var/log/cron
Q150
Q150 A cron job is supposed to run a script, but it fails. The script runs fine manually.
What could be the issue?
Incorrect file permissions
Missing shebang line
Environment variables not set
Script syntax error