In Linux, the _________ command is used to change a user's password.
- passwd
- usermod
- chmod
- pwd
In Linux, the passwd command is used to change a user's password. Users can execute this command to update their login credentials securely.
In Debian-based systems, the ________ command is used to search for packages.
- apt-cache search
- yum install
- dnf update
- pacman -Ss
In Debian-based systems, the "apt-cache search" command is used to search for packages. This command allows users to find packages in the distribution's repositories based on keywords or descriptions.
What is the primary purpose of a VPN in a Linux environment?
- Securing network communication
- Running web servers
- Managing system files
- Creating user accounts
The primary purpose of a VPN (Virtual Private Network) in a Linux environment is to secure network communication. VPNs create encrypted tunnels over public networks, ensuring data privacy and security, which is crucial for remote access and protecting sensitive information.
You notice that a remote server is not accessible via its hostname, but it's accessible via its IP address. Which configuration file would you inspect first?
- /etc/hosts
- /etc/hostname
- /etc/resolv.conf
- /etc/network/interfaces
If a remote server is not accessible via its hostname, checking the /etc/hosts file is a good starting point. This file contains mappings of hostnames to IP addresses, and if there's an issue with name resolution, it's often related to this file.
Which file defines the rules for the sudo command in Linux?
- /etc/sudoers
- /etc/sudo
- /etc/sudoconfig
- /etc/sudopolicy
The file that defines the rules for the sudo command in Linux is /etc/sudoers. This file specifies who is allowed to run what commands with administrative privileges and how. It's a crucial part of managing user access and privileges in a Linux system.
What is the primary difference between ext4 and ext3 file systems?
- Ext4 supports larger file sizes and filesystems
- Ext3 has better journaling capabilities
- Ext4 has a faster file system check on boot
- Ext3 offers improved data compression
The primary difference between ext4 and ext3 file systems is that Ext4 supports larger file sizes and filesystems. Ext4 extends the maximum file size from 16 terabytes to 1 exabyte and supports filesystems up to 1 exabyte, whereas Ext3 has limitations in this regard. This makes Ext4 more suitable for modern storage needs.
A colleague informs you that a specific daemon is causing issues and should be temporarily disabled without stopping it. Which command in Linux would allow you to mask the service?
- systemctl mask
- systemctl disable
- systemctl stop
- systemctl restart
To temporarily disable a service in Linux without stopping it, you can use the systemctl mask command. This command creates a symbolic link to /dev/null, preventing the service from being started automatically, but it doesn't stop the currently running service. It's a useful way to prevent a service from starting at boot.
You've been tasked to ensure a specific service always restarts after failure. Which Linux system would you primarily use to achieve this?
- Systemd
- SysV Init
- Upstart
- OpenRC
To ensure that a specific service always restarts after failure in Linux, you would primarily use Systemd. Systemd is a modern init system that provides a feature-rich service management system and includes options for service restarts and recovery after failure.
Which directory is crucial for the system booting process?
- /boot
- /home
- /opt
- /var
The /boot directory is crucial for the system booting process in Linux. It contains essential files such as the kernel, initial RAM disk (initrd), and bootloader configurations. These files are necessary for the system to start up.
Imagine you're setting up a new server. You want to ensure that every user on the system has their own private space for files and data. Which directory structure in Linux helps facilitate this?
- /etc
- /home
- /tmp
- /var
To provide each user with their own private space for files and data, you would use the /home directory structure in Linux. User home directories are typically located within /home, and this separation ensures user privacy and data security.