If an alias 1s exists, which of the following commands updates the alias to point to the command 1s -1 instead of the alias's current target?
Answer : B
Which of Ihe following slates can NetworkManager show regarding the system's network connectivity? (Choose TWO correct answers.)
Answer : B, C
Which of the following nmcli subcommands exist? (Choose two.)
Answer : B, E
The nmcli command is a command-line interface for NetworkManager, which is a tool for configuring and managing network settings on Linux systems. The nmcli command consists of different subcommands that correspond to different aspects of network configuration and management. The subcommands are:
nmcli general: shows status and permissions of NetworkManager, as well as system hostname and logging level and domains.
nmcli connection: enables you to create, modify, activate, deactivate, delete, and show network connections.
nmcli device: enables you to show, modify, and control network devices, such as interfaces, bonds, teams, bridges, etc.
nmcli monitor: monitors activity of NetworkManager and watches for changes in the state of connectivity and devices.
nmcli networking: enables or disables overall networking.
nmcli radio: enables or disables radio transmitters for Wi-Fi, Bluetooth, and WWAN devices.
nmcli agent: registers as a secret agent that provides and caches network credentials.
The other options listed are not valid nmcli subcommands. There is no nmcli ethernet, nmcli wifi, or nmcli address subcommand. However, nmcli device and nmcli connection can be used to configure and manage Ethernet and Wi-Fi connections and addresses.Reference:
NetworkManager configuration and usage | SLE Micro 5.3
nmcli: NetworkManager Reference Manual - GNOME
nmcli: command not found -- The Geek Diary
Which command is used to set restrictions on the size of a core file that is created for a user when a program crashes?
Answer : C
The ulimit command is used to set or display the limitations on the system resources available to the current shell and its descendants. One of the resources that can be controlled by ulimit is the maximum size of a core file that is created when a program crashes. A core file is a snapshot of the memory and registers of a process at the time of termination, which can be used for debugging purposes. By default, the core file size limit is zero, which means no core file will be generated. To change the core file size limit, the option -c can be used with ulimit, followed by a number that represents the maximum number of blocks (usually 512 bytes) that can be written to a core file. For example, the command ulimit -c 1000 will set the core file size limit to 512000 bytes. To remove the core file size limit, the option -c can be used with ulimit, followed by unlimited. For example, the command ulimit -c unlimited will allow core files of any size to be created.Reference:
Which of the following commands can be used to limit the amount of memory a user may use?
Answer : C
The ulimit command can be used to limit the amount of memory a user may use. The ulimit command is a shell builtin that allows the user to view or modify the resource limits imposed by the operating system. The resource limits can affect the maximum size of files, the maximum number of processes, the maximum amount of CPU time, and the maximum amount of virtual memory a user can access.
To limit the amount of memory a user may use, the -v option can be used with the ulimit command. The -v option sets the maximum amount of virtual memory available to the current shell and its children in kilobytes. For example, the command ulimit -v 1000000 would limit the virtual memory to 1 GB. The -m option can also be used to set the maximum resident set size, which is the amount of physical memory used by a process, but this option is not supported by all systems.
The ulimit command can be used interactively in a shell session, or it can be placed in a shell initialization file, such as .bashrc or .profile, to apply the limits to all future shell sessions. The ulimit command can also be used in conjunction with the /etc/security/limits.conf file, which allows the system administrator to set global or per-user resource limits for all users and processes. The /etc/security/limits.conf file can specify hard and soft limits for each resource, as well as the scope of the limit, such as user, group, or domain.
The other commands listed are not related to limiting the amount of memory a user may use. The umask command sets the default file permissions for newly created files and directories. The usermod command modifies the user account information, such as the home directory, the login shell, or the password expiration date. The passwd command changes the user password. The chage command changes the password aging information, such as the minimum and maximum number of days between password changes, or the number of days before the password expires.Reference:
How to limit user environment with ulimit Linux command
Control server access using hosts.allow and hosts.deny files
To prevent a specific user from scheduling tasks with at, what should the administrator do?
Answer : C
The /etc/at.deny file is a file that contains a list of users who are not allowed to use the at command to schedule jobs. If the file exists, any user who is not in the /etc/at.allow file and is in the /etc/at.deny file will be denied access to the at command. To prevent a specific user from scheduling tasks with at, the administrator can simply add the user's name to the /etc/at.deny file. For example, to prevent the user bob from using the at command, the administrator can use the following command:
echo ''bob'' | sudo tee -a /etc/at.deny
The other options are not correct. The /etc/at.allow file is a file that contains a list of users who are allowed to use the at command. Adding a user to this file will not prevent them from scheduling tasks with at. The /etc/atd.conf file is a configuration file for the at daemon, which does not have a [deny] section. Adding a user to this file will not affect their access to the at command. The nojobs group is not a predefined group in Linux, and adding a user to this group will not prevent them from scheduling tasks with at. The atd command does not have a --deny option, and running this command will not prevent a user from scheduling tasks with at.Reference:
at Command in Linux with Examples - GeeksforGeeks
How to Use the Linux at Command {9 Examples} - phoenixNAP
Which of the following programs can be used to determine the routing path to a given destination?
Answer : E
The traceroute program can be used to determine the routing path to a given destination by sending packets with incrementing TTL values and recording the source of the ICMP time exceeded messages. This way, it can show the intermediate hops and the round-trip times for each packet. The other programs have different purposes: dig is used to query DNS servers, netstat is used to display network connections and statistics, ping is used to test the reachability of a host by sending ICMP echo requests and measuring the response time, and route is used to manipulate the routing table.Reference: