A user reports that a script in /home/user/script.sh fails to execute. The output of 'ls -l script.sh' is '-rw-r--r-- 1 user user 1024 Apr 1 10:00 script.sh'. Which command should be used to make the script executable for all users?
A system administrator needs to set the umask so that newly created files have permissions of 644 and directories have permissions of 755. Which umask value should be set?
An administrator wants to change the runlevel/target to a state where only a minimal set of processes is running, and network services are disabled. Which two systemd targets achieve this? (Choose two.)
A system administrator wants to ensure a service starts automatically at boot and also starts immediately without rebooting. Which of the following systemctl commands or command combinations achieve both goals? (Choose all that apply.)
A Linux administrator needs to find all files in /var/log that have been modified within the last 7 days and are larger than 10 MB. Which find command accomplishes this?
An administrator needs to find the line number of the first occurrence of the string 'ERROR' in a log file, ignoring case. Which command is most appropriate?
A file has permissions rwxr-x--- and is owned by user alice and group devs. Which command would add the SUID bit while preserving existing permissions?
An administrator needs to replace all occurrences of '192.168.1.1' with '10.0.0.1' in a configuration file named config.txt. Which sed command should be used to perform an in-place edit?
An administrator suspects that a malicious process is running and wants to list all processes, including those without a controlling terminal, and see their full command line. Which two commands can provide this information? (Select TWO.)
A system administrator is troubleshooting a service that fails to start at boot. The system uses systemd. Which of the following commands would the administrator use to check the service's status and view its recent log entries?
A process is running with a nice value of 5. The system administrator wants to increase its priority (lower the nice value) to -5 but is not the owner of the process. What must the administrator do first to achieve this?
After making changes to /etc/grub.d/ and /etc/default/grub, an administrator needs to regenerate the GRUB2 configuration file. Which command should be used?
An administrator wants to display only the second field from a colon-delimited file named 'passwd' using a text processing tool. Which command will achieve this?
A technician is troubleshooting a service that fails to start. The service file is located in /usr/lib/systemd/system. Which THREE commands can be used to investigate the service's status and logs? (Choose three.)
A system running systemd is failing to boot properly. The administrator wants to boot into an environment with only the essential services for troubleshooting. Which systemd target should be selected at boot?
A system administrator needs to remove all files in /tmp that have not been accessed in the last 30 days and are not owned by root. Which two commands, combined, could be used to accomplish this? (Select TWO).
An administrator wants to view the contents of a compressed log file /var/log/syslog.2.gz without decompressing it to disk. Which two commands can be used to display the file contents? (Select TWO).
A security analyst wants to identify all lines in a log file that contain either 'ERROR' or 'WARNING' and also contain 'timeout'. Which three commands can be used to achieve this? (Select THREE).
A system administrator is configuring a new disk partition for a database server. The disk has been partitioned as /dev/sdb1. Which three steps are necessary to make the filesystem available for use? (Choose three.)
A Linux administrator wants to change the permissions of a file to allow the owner to read, write, and execute; the group to read and execute; and others to read only. Which chmod command should be used?
A system administrator needs to find all files in the /etc directory that are larger than 1 MB and are regular files. Which find command accomplishes this?
An administrator wants to display the last 20 lines of a log file and also write those lines to a file called recent.log. Which command should be used?
A Linux server is booting but stops at a prompt with the message 'Give root password for maintenance'. Which systemd target is the system likely trying to reach?
A technician needs to remove all files in /tmp that are owned by the user 'jdoe' and have not been accessed in 10 days. Which THREE commands or options would be part of a correct solution? (Select THREE.)
A system administrator wants to find all files in /var/log that have been modified in the last 7 days and are larger than 10MB, then delete them interactively. Which command accomplishes this?
A technician needs to replace all occurrences of '192.168.1.' with '10.0.0.' in the file /etc/network/interfaces and save the changes. Which command accomplishes this?
During boot, the system stops at a shell with limited functionality. The administrator suspects the root filesystem is corrupted. Which target should the system be booted into to perform recovery?
A system administrator needs to view the last 15 lines of a log file that is constantly being updated. Which TWO commands can be used to achieve this? (Choose two.)
A technician needs to replace the string 'old_config' with 'new_config' in the file /etc/app.conf and save the changes in place. Which sed command accomplishes this?
A Linux system fails to boot, and the administrator wants to access a minimal environment to repair the system. Which systemd target should be specified in the kernel command line to achieve this?
An administrator wants to locate files that have the SUID or SGID special permission set. Which three find commands can accomplish this? (Choose three.)
A technician needs to apply an access control list (ACL) to a file to grant read and write permissions to a specific user. Which two commands are used to manage ACLs? (Choose two.)
A Linux administrator is investigating a performance issue on a server. The administrator needs to identify which processes are consuming the most CPU and memory, and then adjust their priority. Which TWO commands should the administrator use to accomplish this? (Choose TWO.)
A system administrator needs to locate all regular files in /var/log that have been modified within the last 7 days and have a size greater than 10 MB. The administrator then needs to compress these files using gzip. Which THREE commands or options should be used together to accomplish this? (Choose THREE.)
A Linux administrator is configuring file permissions for a shared directory used by a development team. The administrator wants to ensure that any new files created in the directory inherit the group ownership of the directory and that the group has read and write permissions on those files. Which TWO actions should the administrator take? (Choose TWO.)
A Linux administrator needs to schedule a one-time job that will run at 2:30 AM tomorrow. The job should execute a script located at /home/user/backup.sh. Which command should the administrator use to schedule this job?
A Linux administrator needs to configure a systemd service to start automatically only when the system reaches the graphical.target, and not during multi-user.target. Which command should be used to set this dependency?
A Linux administrator is troubleshooting a server that fails to boot, dropping into an emergency shell. The root filesystem is mounted read-only. The administrator needs to remount the root filesystem with read-write permissions to make repairs. Which command should be used?
A Linux administrator needs to schedule a recurring backup script to run every day at 2:00 AM. The script is located at /usr/local/bin/backup.sh and must run as the user 'backupuser'. Which two methods can be used to achieve this? (Choose two.)
A Linux administrator needs to ensure that a custom application starts automatically after the network is fully online and before any user logs in. The application runs as a systemd service. Which two actions should the administrator take? (Choose two.)
A Linux administrator needs to ensure that a custom systemd service named myapp.service starts only after the network is fully online and the database service postgresql.service is running. Which directive should be used in the [Unit] section of myapp.service?
A Linux administrator needs to schedule a backup script to run every day at 2:30 AM. The script is located at /usr/local/bin/backup.sh. Which command should the administrator use to add this job to the crontab for the root user?
A Linux administrator is preparing a server for a new application and needs to configure an ext4 filesystem on a newly attached disk, /dev/sdc1, with a label of appdata so it can be referenced by label. The administrator also needs to ensure the filesystem is checked for errors on the next boot. Which TWO commands should the administrator run to accomplish these tasks? (Choose two.)
A Linux administrator is preparing a new server and needs to schedule a recurring backup job that runs every day at 2:30 AM. The job must run as the root user and should be defined in a location that is not user-specific. Which of the following should the administrator use?
A Linux server has a filesystem mounted at /data that is running out of space. The administrator wants to increase the size of the logical volume 'lv_data' by 10GB and then resize the filesystem online without unmounting it. The volume group 'vg_data' has 20GB of free space. Which sequence of commands will accomplish this?
A Linux administrator needs to schedule a script /opt/backup.sh to run every day at 2:30 AM. The script must run as the user 'backup' and the schedule should survive system reboots. Which method should be used?
A Linux administrator needs to schedule a one-time job that runs a backup script at 2:00 AM on July 20. The job should not repeat. Which command should the administrator use?
A Linux administrator needs to schedule a one-time job that will run at 2:30 AM on December 15. The job should execute a backup script located at /usr/local/bin/backup.sh. Which command will schedule this job correctly?
A Linux administrator needs to configure a new hard disk (/dev/sdb) with a single partition that will be used as an ext4 filesystem. The partition must be aligned to 2048 sectors for optimal performance. Which TWO commands are necessary to create the partition and then make the filesystem? (Choose two.)
A user reports that they cannot write to a file named 'report.txt' in their home directory, even though they own the file. The permissions are displayed as '-rw-r--r--'. Which command will allow the owner to write to the file?
A Linux administrator is troubleshooting a system that fails to mount a new XFS filesystem at /data during boot. The administrator wants to verify the UUID of the filesystem and ensure the /etc/fstab entry is correct. Which TWO commands should the administrator use? (Choose two.)
A Linux administrator needs to schedule a backup script to run every day at 2:00 AM. The administrator also wants to ensure that the script runs only if the system is powered on at that time, and if missed, it should not run later. Which two commands or files should the administrator use to accomplish this? (Choose two.)
A Linux administrator is configuring a systemd service that should start only after the network is fully online and the remote NFS mount at /mnt/nfs is available. The service unit file currently has After=network.target. Which additional directive should be added to ensure the service starts only when the NFS mount is mounted?
A Linux administrator needs to schedule a script to run every day at 3:30 AM. The script is located at /usr/local/bin/backup.sh and must run as the user 'backupuser'. Which crontab entry should be added to the backupuser's crontab?
A Linux administrator needs to configure a systemd service to start automatically at boot and also to restart automatically if it crashes. Which two directives should be added to the [Unit] and [Service] sections of the unit file, respectively? (Choose two.)
A Linux administrator needs to identify all files in the /etc directory that are world-writable. Which TWO commands will accomplish this? (Choose two.)
A Linux administrator is configuring a systemd service unit for a custom application. The application requires that the service be restarted automatically if it crashes, and that it starts only after the network is online. Which two directives should be added to the [Unit] and [Service] sections respectively? (Choose two.)
A Linux administrator is troubleshooting a system where a scheduled backup script is not running. The script is located at /usr/local/bin/backup.sh and is scheduled via a systemd timer. The administrator wants to verify that the timer is enabled and will trigger the associated service. Which TWO commands should the administrator use? (Choose two.)
A Linux administrator is troubleshooting a system that fails to mount the /home filesystem at boot. The /etc/fstab entry for /home uses a UUID, but the administrator suspects the UUID is incorrect. Which command will display the UUIDs of all block devices to verify the correct UUID for the /home partition?
A Linux administrator needs to configure a system to automatically mount a USB drive at /mnt/usb whenever it is plugged in. The drive is formatted with ext4 and has the label 'BACKUP'. Which approach will achieve this with minimal manual intervention?
A Linux administrator is troubleshooting a systemd service that fails to start during boot. The service unit file has a dependency on network.target, but the service still starts before the network is fully online. Which directive should be added to the unit file to ensure the service starts only after the network is fully configured?
A Linux administrator notices that a critical application service managed by systemd keeps restarting every few seconds. The administrator wants to inspect the service's recent log entries and confirm which unit file path systemd is actually loading. Which TWO commands will provide this information? (Choose two.)
A junior administrator needs to schedule a one-time job that runs the script /opt/backup.sh at 23:30 tonight on a server that uses systemd. The administrator wants the job to survive a reboot if the server restarts before the scheduled time. Which command correctly schedules this job?
A Linux administrator needs to schedule a one-time job that runs a backup script at 2:30 AM next Wednesday. The job must not recur. Which command should the administrator use to schedule this task?
An administrator must extend an existing LVM volume group named vgdata by adding a new physical disk /dev/sdc so that the logical volume lvdata can grow. The disk has no partition table and will be used whole. Which sequence of commands correctly adds the disk and extends the logical volume?
A Linux administrator is troubleshooting a system where the /home directory is running out of space. The administrator needs to identify which files are consuming the most space within /home, sorted from largest to smallest. Which command should the administrator use?
A Linux server hosts a web application that must start only after the network is fully online and the database service is accepting connections. The administrator is writing a custom systemd unit for the application. Which directive combination correctly enforces these ordering and dependency requirements?
A Linux administrator is configuring a new server and needs to ensure that the firewall allows incoming SSH connections on port 22 and HTTP connections on port 80, while blocking all other incoming traffic. The system uses firewalld. Which TWO commands should the administrator use to achieve this? (Choose two.)
A Linux administrator needs to create a new logical volume named 'data' in the volume group 'vg01' with a size of 50GB, and format it with the XFS filesystem. Which sequence of commands should the administrator use?
A Linux administrator wants to limit the total amount of memory available to all processes in a user slice to 2GB. Which command should be used to apply this limit persistently?
A Linux administrator needs to locate all files in the /var directory that have been modified within the last 30 minutes and are larger than 10MB. Which command accomplishes this task?
An administrator wants to grant a specific user, 'jdoe', read and write access to a file that is owned by root:root with permissions 640. The administrator does not want to change the file's owner or group. Which approach should be used?
A Linux administrator wants to search for all occurrences of the word 'ERROR' in log files under /var/log, ignoring case, and also print the line numbers. Which command should be used?
An administrator needs to replace all occurrences of 'oldhost' with 'newhost' in the configuration file /etc/hosts. Which command will perform the replacement and save the changes directly to the file?
A service called 'myapp' fails to start automatically after a system reboot. The administrator wants to ensure the service starts at boot. Which systemctl command should be used?
A technician notices a script fails to execute because the user does not have permission. The script currently has permissions 644. The technician needs to add execute permission for the owner only. Which command accomplishes this?
An administrator wants to find all files in /var/log that have been modified within the last 2 days and have a .log extension. Which command should be used?
A Linux engineer is troubleshooting a boot issue. The system boots to a command-line interface but does not start the graphical interface. Which systemd target should be set as default to boot into a graphical environment?
A Linux administrator needs to add an ACL entry to grant read permission to a user named 'jdoe' on a file. Which TWO commands can be used to achieve this? (Select TWO).
A Linux administrator wants to search for the pattern 'ERROR' in all files under /var/log, ignoring case, and display line numbers. Which THREE options should be used with the grep command? (Select THREE).
A system administrator wants to change the priority of a running process with PID 1234 to a lower priority (higher nice value). Which command should be used?
Which of the following directories is defined by the Filesystem Hierarchy Standard (FHS) as containing essential user command binaries that need to be available in single-user mode?
A technician is troubleshooting a service that fails to start at boot. Which systemctl command should be used to ensure the service starts automatically on subsequent boots?
A technician wants to create a symbolic link in /usr/local/bin that points to /opt/myapp/bin/start.sh. The technician has write permissions to /usr/local/bin. Which command should be used?
A Linux administrator needs to locate all files in the /etc directory that have been modified in the last 24 hours and are not owned by root. Which two commands can be combined to achieve this? (Select TWO.)
A Linux administrator needs to locate all files in the /var/log directory that have been modified within the last 2 days and contain the word 'error' (case-insensitive). Which command accomplishes this?
A user wants to change the permissions of a file to give the owner full control, the group read and execute, and others no access. Which of the following chmod commands will achieve this?
An administrator needs to add an ACL entry to a file that grants the user 'john' read and write permissions. The file currently has no ACLs. Which command should the administrator use?
Which of the following directories in the Filesystem Hierarchy Standard (FHS) contains variable data files such as logs, spool files, and temporary files that persist across reboots?
A system administrator wants to view the last 10 lines of a log file and also save those lines to another file for analysis. Which command should the administrator use?
During the boot process, after the kernel is loaded and the initramfs is executed, which component is responsible for starting the user-space services and managing the system state?
An administrator wants to find all files in the current directory tree that are larger than 100 MB and have the .log extension. Which find command will accomplish this?
An administrator wants to replace all occurrences of 'oldstring' with 'newstring' in a configuration file named config.cfg, and save the changes. Which sed command should be used?
An administrator notices that a service named 'httpd' is not running. They want to check its current status and, if inactive, start it. Which set of systemctl commands should be used?
A system administrator runs 'umask 027' in a Bash shell. What will be the default permissions for a new directory created in that shell? (Assume no other umask changes.)
A process is consuming excessive CPU and needs to be terminated immediately. The PID is 1234. Which command will terminate the process with the most forceful signal?
A Linux administrator needs to view real-time information about running processes, including CPU and memory usage. Which TWO commands can be used for this purpose? (Choose two.)
An administrator needs to grant read and write access to the 'developers' group on a directory while preserving existing permissions for the owner and others. Which TWO commands can be used to modify ACLs? (Choose two.)
A Linux administrator needs to change the permissions of a file to be readable and writable by the owner, readable by the group, and no access for others. Which command accomplishes this?
A system administrator wants to find all files in /var/log that have been modified in the last 7 days and are larger than 100MB. Which command should be used?
A developer wants to grant a user named 'john' read and write permissions to a file, but the file currently has an ACL that gives 'jane' full control. The administrator wants to add an ACL entry for 'john' without modifying existing entries. Which command accomplishes this?
An administrator needs to permanently mount an ext4 filesystem on /dev/sdb1 to the /data directory. Which file must be edited to ensure the mount persists across reboots?
An administrator wants to change the priority of a running process with PID 1234 to a lower priority (nicer). The current nice value is 0. Which command will set the nice value to 10?
A Linux administrator needs to change the permissions of a file to allow the owner to read and write, the group to read only, and others to have no access. Which chmod command should be used?
A user reports that a specific process is consuming too much CPU. The administrator needs to change the priority of the process to a lower value (nicer). Which command sequence is appropriate?
An administrator is troubleshooting a boot issue. The system boots to a console with limited functionality. Which systemd target should be used to bring up the system with network and multi-user support?
A system administrator notices that a process with PID 1234 is consuming excessive CPU. The administrator wants to terminate this process gracefully. Which command should be used?
An administrator wants to start a long-running script in the background so that it continues running even after logging out. Which command should be used?
An administrator is troubleshooting a service that fails to start. The administrator wants to view the last 50 lines of the service's journal log entries from the current boot. Which journalctl command should be used?
An administrator needs to apply a set of permissions to an existing directory and all its contents, setting the owner to 'rwx', group to 'rx', and others to '---'. Additionally, newly created files within the directory should inherit the group. Which commands should the administrator run? (Assume the directory is /data, and the group is 'staff'.)
A system administrator wants to display a list of all currently running processes, including those of other users, with full command lines. Which TWO commands can achieve this? (Select TWO.)
An administrator needs to update the package cache and upgrade all installed packages on a Debian-based system. Which TWO commands are appropriate for this task? (Select TWO.)
An administrator needs to give a user read and write access to a file without changing the file's group or adding the user to any group. Which method should be used?
An administrator wants to gather information about disk usage for a specific directory and its subdirectories. Which TWO commands can be used for this purpose? (Choose two.)
A Linux system has a directory with permissions drwxr-xr-x. A user in the group 'dev' tries to create a new file inside this directory. Which permission is missing that prevents the user from creating the file?
A system administrator needs to monitor real-time process information and system resource usage. Which two commands can be used for this purpose? (Choose two.)
A system administrator is investigating a performance issue and wants to view kernel-related messages. Which three commands can be used to access kernel ring buffer messages? (Choose three.)
A technician wants to extract the third column of a tab-separated file and sort the output uniquely. Which three commands can be combined using pipes to achieve this? (Choose three.)
A Linux administrator needs to create a new user account 'analyst' with a home directory at /home/analyst and the default shell set to /bin/bash. The user should also be added to the existing supplementary group 'research'. Which command will accomplish this in a single step?
A Linux administrator is troubleshooting a systemd service that fails to start. The service unit file is located at /etc/systemd/system/myservice.service. After editing the unit file, the administrator runs systemctl start myservice, but the service still uses the old configuration. Which command should be run to ensure systemd reloads the modified unit file?
A Linux administrator needs to scan all currently connected USB devices and display detailed information such as vendor ID, product ID, and device class. Which command should the administrator run?
A Linux server has a logical volume that is running out of space. The administrator extends the underlying volume group by adding a new physical volume, then extends the logical volume and resizes the filesystem. Which command should be used to resize the ext4 filesystem after extending the logical volume?
A junior administrator needs to add a persistent mount entry for a new XFS filesystem on /dev/sdb1 at the /data directory so it is mounted automatically at every boot. The administrator opens /etc/fstab and must identify the correct field order for the entry. Which field order should be used in the /etc/fstab line?
A Linux administrator needs to permanently set the system-wide umask to 027 for all users on a production server. The administrator edits /etc/profile and adds the line 'umask 027'. After rebooting, a user logs in and runs 'umask', which returns 0022. Which of the following is the most likely reason the setting did not take effect?
A Linux administrator needs to configure a system to automatically mount an NFS share at /mnt/data during boot. The NFS server is 192.168.1.100 exporting /export/data. Which file should the administrator edit to add the appropriate entry?
A Linux administrator needs to check the available disk space on all mounted filesystems in a human-readable format. Which command should the administrator use?
A Linux administrator is troubleshooting a system that is running out of disk space on the root filesystem. The administrator needs to identify which directories are consuming the most space. Which TWO commands can be used to find the largest directories? (Choose two.)
An administrator notices that the /var partition on a production server is nearly full and wants to determine which subdirectories consume the most space before deleting anything. The administrator has root privileges and wants a human-readable summary of each immediate subdirectory under /var, one line per directory. Which command accomplishes this?
A Linux administrator is troubleshooting a systemd service named 'webapp.service' that fails to start. The administrator runs 'systemctl status webapp.service' and sees that the service is in a failed state. Which TWO commands will provide additional diagnostic information about why the service failed? (Choose two.)
An administrator manages a server with several systemd services. A service named reportgen.service must not start until another service named dbengine.service is fully active, and reportgen should be stopped automatically if dbengine stops. Which directive combination in the reportgen.service unit file achieves this ordering and dependency?
A Linux administrator notices that the /home directory is running low on space. They need to identify which user directories are consuming the most disk space. Which command will display the total disk usage of each immediate subdirectory under /home, in human-readable format, sorted by size?
A Linux administrator is preparing a new server that uses systemd-boot as the boot loader. The administrator wants to verify the current boot loader entries and their order. Which command should the administrator run?
A junior administrator needs to change the ownership of the file /var/www/html/index.html from user 'www-data' to user 'apache' and group 'apache'. Which command will accomplish this?
A Linux server is configured to use systemd. The administrator wants to ensure that a custom service named 'app.service' starts automatically at boot, even if it has been manually stopped. Which command should be used?
A Linux administrator needs to create a new user account named 'jsmith' with a home directory /home/jsmith and the default shell /bin/bash. Which command should the administrator use?
An administrator needs to monitor a service's log output and wants systemd to capture the output of a specific service unit into the journal, tagged so it can be filtered by the unit name. The administrator also wants to limit how much disk space the journal may consume so it does not fill the root filesystem. Which configuration accomplishes both goals?
A Linux administrator is troubleshooting a system that fails to mount the root filesystem during boot, dropping to an emergency shell. The administrator suspects that a recently added entry in /etc/fstab is incorrect. Which of the following commands should be used to verify the syntax and mountability of all entries in /etc/fstab without actually mounting them?
A Linux administrator is troubleshooting a server that fails to mount a filesystem listed in /etc/fstab during boot, causing the system to drop into emergency mode. The administrator wants to prevent the system from entering emergency mode if this particular mount fails, while still attempting to mount it. Which fstab option should be added to the mount entry?
A Linux administrator needs to change the runlevel of a systemd-based system to a state where only a single user can log in for maintenance, without starting network services. Which systemd target should the administrator use?
A Linux administrator needs to create a new user account 'jdoe' with a home directory /home/jdoe and the default shell /bin/bash. Which command will accomplish this?
A Linux administrator is configuring a persistent mount for a new 2TB XFS filesystem on /dev/sdb1 so it mounts automatically at /data with quota accounting enabled. The administrator edits /etc/fstab and adds the entry, then runs mount -a to validate it. Which fstab field combination correctly applies user and group quota accounting on this XFS mount?
A Linux administrator needs to change the hostname of a system to 'webserver01' permanently. The system uses systemd. Which command should the administrator use?
A Linux administrator needs to schedule a backup script to run every day at 2:30 AM. Which TWO of the following methods can be used to achieve this? (Choose two.)