- How can you add a user to the sudo group in Ubuntu?
a) useradd -G sudo username
b) adduser sudo username
c) sudo adduser username sudo
d) addgroup sudo username
Answer: c) sudo adduser username sudo
Explanation: In Ubuntu, you can add a user to the sudo group using the command "sudo adduser username sudo". This grants the user administrative privileges.
- Which command is used to compress files/directories into a .tar.gz archive in Ubuntu?
a) tar -czvf
b) gzip -c
c) zip -r
d) compress -r
Answer: a) tar -czvf
Explanation: The "tar -czvf" command is used to compress files or directories into a .tar.gz archive in Ubuntu. The -c option creates a new archive, -z uses gzip compression, -v enables verbose output, and -f specifies the archive filename.
- Which file contains the system-wide crontab configuration in Ubuntu?
a) /etc/cron.d
b) /var/spool/cron/crontabs
c) /etc/anacrontab
d) /etc/crontab
Answer: d) /etc/crontab
Explanation: The system-wide crontab configuration is stored in the /etc/crontab file in Ubuntu. It allows scheduling periodic tasks to be executed by the cron daemon.
- Which command is used to modify firewall rules in Ubuntu?
a) iptables
b) ufw
c) firewalld
d) firewall-cmd
Answer: b) ufw
Explanation: The ufw (Uncomplicated Firewall) command is used to configure and manage firewall rules in Ubuntu. It provides a simplified interface to iptables for easier firewall management.
- What is the default shell in Ubuntu?
a) bash
b) sh
c) csh
d) zsh
Answer: a) bash
Explanation: The default shell in Ubuntu is bash (Bourne Again SHell). It is a versatile and powerful shell with extensive features and compatibility.
- Which command is used to display the IP address assigned to network interfaces in Ubuntu?
a) ifconfig
b) ipaddr
c) ipconfig
d) netstat
Answer: a) ifconfig
Explanation: The ifconfig command is used to display the IP address assigned to network interfaces in Ubuntu. It provides detailed information about interfaces, including their IP addresses, netmasks, and MAC addresses.
- Which command is used to rename a file in Ubuntu?
a) rename
b) mv
c) renamefile
d) filemv
Answer: b) mv
Explanation: The mv command is used to rename a file in Ubuntu. By specifying the original file name and the new name/location, you can effectively rename the file.
- Which command is used to check the version of Ubuntu installed?
a) version
b) uname -r
c) ubuntu -v
d) lsb_release -a
Answer: d) lsb_release -a
Explanation: The lsb_release command, along with the -a option, shows detailed information about the Ubuntu version installed. It includes the distribution codename, release number, and more.
- Which file stores the system boot configuration in Ubuntu?
a) /etc/boot.conf
b) /etc/grub.conf
c) /etc/bootloader.cfg
d) /etc/default/grub
Answer: d) /etc/default/grub
Explanation: The system boot configuration in Ubuntu is stored in the /etc/default/grub file. It contains parameters and settings for the GRUB bootloader, such as default boot options and timeout.
- Which command is used to view the contents of a text file in Ubuntu?
a) readfile
b) view
c) cat
d) less
Answer: c) cat
Explanation: The cat command is used to view the contents of a text file in Ubuntu. It displays the contents of the file directly in the terminal.
- Which software package provides the OpenSSH server in Ubuntu?
a) sshd
b) openssh-server
c) ssh-server
d) secure-shell
Answer: b) openssh-server
Explanation: The openssh-server package provides the OpenSSH server in Ubuntu, allowing secure remote access to the system using the SSH protocol.
- What is the purpose of the chmod command in Ubuntu?
a) It is used to generate checksums of files.
b) It is used to change the ownership of files and directories.
c) It is used to compress files and directories.
d) It is used to change file/directory permissions.
Answer: d) It is used to change file/directory permissions.
Explanation: The chmod command in Ubuntu is used to modify file and directory permissions. It allows granting or revoking permissions for read, write, and execute operations for different user groups.
Note: The provided answer key is only for reference and may vary based on the specific Ubuntu certification exam requirements.