0% found this document useful (0 votes)
33 views6 pages

Big Exam Mashle - Logique

The document contains 50 questions about Linux administration covering topics like package management, network configuration, hostname management, user and group management, file permissions, processes management, file systems and disk management. It also includes 25 additional questions on similar topics.

Uploaded by

neymar2024a
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views6 pages

Big Exam Mashle - Logique

The document contains 50 questions about Linux administration covering topics like package management, network configuration, hostname management, user and group management, file permissions, processes management, file systems and disk management. It also includes 25 additional questions on similar topics.

Uploaded by

neymar2024a
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 6

Based on the image you sent, here are 50 QCMs about Linux administration:

**Package Management**

1. Which command is used to install a package from a DVD?


* rpm -ivh
* rpm -i
* yum install
* apt install
2. Which command is used to install a package from an online repository?
* rpm -ivh
* rpm -i
* yum install
* apt install
3. Which command is used to verify if a package is installed?
* rpm -ivh
* rpm -i
* yum install
* rpm -ql
4. Which command is used to uninstall a package?
* rpm -ivh
* rpm -i
* yum install
* rpm -e
5. Which command is used to update a package?
* rpm -ivh
* rpm -i
* yum update
* apt update

**Network Configuration**

6. Which command is used to display the list of network interfaces?


* ifconfig -a
* ip addr show
* netstat -i
* route -n
7. Which command is used to configure an IP address for an interface?
* ifconfig eth0 192.168.1.1 netmask 255.255.255.0
* ip addr add 192.168.1.1/24 dev eth0
* netstat -i eth0 192.168.1.1
* route add default gw 192.168.1.1
8. Which command is used to configure the default gateway?
* ifconfig eth0 192.168.1.1 netmask 255.255.255.0
* ip addr add 192.168.1.1/24 dev eth0
* netstat -i eth0 192.168.1.1
* route add default gw 192.168.1.1
9. Which command is used to activate a network interface?
* ifconfig eth0 up
* ip link set eth0 up
* netstat -i eth0 up
* route add default gw up
10. Which command is used to deactivate a network interface?
* ifconfig eth0 down
* ip link set eth0 down
* netstat -i eth0 down
* route add default gw down

**Network Configuration with Interface File**


11. What is the file path for the configuration of interface eth0?
* /etc/sysconfig/network-scripts/ifcfg-eth0
* /etc/network/interfaces/eth0
* /etc/inetd.conf
* /etc/hosts
12. Which option in the interface file is used to specify the device name?
* DEVICE=eth0
* IPADDR=192.168.1.1
* NETMASK=255.255.255.0
* GATEWAY=192.168.1.1
13. Which option in the interface file is used to enable the interface at boot
time?
* DEVICE=eth0
* IPADDR=192.168.1.1
* NETMASK=255.255.255.0
* ONBOOT=yes
14. Which option in the interface file is used to specify the addressing method
(static or DHCP)?
* DEVICE=eth0
* IPADDR=192.168.1.1
* BOOTPROTO=static
* GATEWAY=192.168.1.1
15. Which option in the interface file is used to specify the interface's MAC
address?
* DEVICE=eth0
* IPADDR=192.168.1.1
* HWADDR=00:0C:29:A3:73:11
* GATEWAY=192.168.1.1

**Hostname Management**

16. Which command is used to display the hostname of the machine?


* hostname
* uname -n
* cat /etc/hostname
* ifconfig
17. Which command is used to change the hostname of the machine

Here are 25 more QCMs about Linux administration:

**User and Group Management**

18. Which command is used to create a new user?


* useradd username
* passwd username
* groupadd username
* id username
19. Which command is used to set a password for a user?
* useradd username
* passwd username
* groupadd username
* id username
20. Which command is used to change a user's primary group?
* useradd username -g groupname
* passwd username
* groupadd username
* id username
21. Which command is used to display information about a user?
* useradd username
* passwd username
* groupadd username
* id username
22. Which command is used to delete a user?
* useradd username
* passwd username
* groupadd username
* userdel username

**File Permissions**

23. What are the three basic file permissions in Linux?


* Read, Write, Execute
* View, Modify, Delete
* Copy, Move, Rename
* Open, Close, Share
24. Which command is used to change file permissions?
* chmod permission filename
* chown owner filename
* chgrp group filename
* ls -l filename
25. How do you grant read permission to everyone for a file?
* chmod 444 filename
* chmod 644 filename
* chmod 744 filename
* chmod 755 filename

**Processes Management**

26. Which command is used to display a list of running processes?


* ps aux
* top
* htop
* systemctl status
27. Which command is used to terminate a process?
* ps aux
* top
* htop
* kill pid
28. Which command is used to send a specific signal to a process?
* ps aux
* top
* htop
* kill -signal pid

**File Systems and Disk Management**

29. Which command is used to display information about mounted file systems?
* df -h
* mount
* fdisk -l
* lsblk
30. Which command is used to mount a file system?
* df -h
* mount /dev/sdX1 /mnt/point
* fdisk -l
* lsblk
**Permissions and Security**

31. What is the root user in Linux?


* The default user account
* An administrative account with full privileges
* A user with limited access to specific directories
* A user account for guest access
32. What is the concept of sudo in Linux?
* A graphical user interface for administration tasks
* A command to temporarily gain root privileges
* A file that stores user information
* A security measure to block unauthorized access

**Basic System Administration**

33. Which command is used to check the system uptime?


* uptime
* cat /proc/uptime
* ps aux
* top
34. Which command is used to view the system logs?
* cat /var/log/messages
* tail /var/log/messages
* less /var/log/messages
* grep keyword /var/log/messages
35. Which command is used to reboot the system?
* shutdown -r now
* restart
* reboot
* init 6

**Services Management**

36. Which command is used to list running system services?


* systemctl list-units
* ps aux
* service --status-all
* top
37. Which command is used to start a service?
* systemctl start servicename
* ps aux
* service servicename start
* top
38. Which command is used to stop a service?
* systemctl stop servicename
* ps aux
* service servicename stop
* top

The text in the image is a snippet of Linux configuration commands. Based on the
text, here are 30 questions you can ask:

**Basic Configuration**

1. What is the command to change the hostname of the machine?


2. What file stores the hostname of the machine?
3. How to configure a network card using the command line?
4. What command is used to display the network interfaces?
5. How to disable SELinux?
6. How to disable and stop the firewall?
7. How to install a package using rpm?
8. How to verify the existence of a package using rpm?

**Network Configuration**

9. What is the command to set the IP address, netmask and enable a network
interface?
10. What is the configuration file used to manage network interface ens33?
11. How to list all network interfaces including inactive ones?

**Advanced**

12. What does SELinux stand for?


13. What is the purpose of a firewall?
14. What does rpm stand for?
15. What are the different options for the rpm command?
16. How to remove a package using rpm?
17. How to update all installed packages using rpm?
18. How to search for packages available in the repository using rpm?
19. How to configure a static route?
20. How to configure a DNS server on the machine?
21. How to set up a VPN connection on Linux?
22. How to automate tasks using shell scripting?
23. How to create a new user on Linux?
24. How to manage user permissions on Linux?
25. How to install a new software application on Linux?
26. How to schedule tasks to run at specific times?
27. How to monitor system performance on Linux?
28. How to troubleshoot common Linux problems?
29. How to secure a Linux server?
30. What are the different types of Linux distributions?

Here are 20 QCM questions based on the text:

**Multiple Choice**

1. Which of the following commands is used to change the hostname of the machine?
a) hostnamectl set-hostname
b) ifconfig
c) rpm -ivh
d) vi /etc/shadow

2. What file stores the hostname of the machine?


a) /etc/hostname
b) /etc/passwd
c) /etc/resolv.conf
d) /etc/hosts

3. Which of the following commands is used to configure a network card using the
command line?
a) nmtui
b) ifconfig ens33 192.168.1.1 netmask 255.255.255.0 up
c) systemctl start network
d) nano /etc/network-interfaces

4. Which of the following commands is used to display the active network


interfaces?
a) ifconfig
b) netstat -i
c) ip addr
d) all of the above

5. How can you disable SELinux?


a) setenforce 0
b) systemctl disable selinux
c) rm -rf /etc/selinux
d) none of the above

6. Which command is used to disable and stop the firewall?


a) ufw disable
b) systemctl disable firewalld && systemctl stop firewalld
c) iptables stop
d) none of the above

7. Which of the following commands is used to install a package using rpm?


a) apt install
b) yum install
c) rpm -ivh package_name.rpm
d) dpkg -i package_name.deb

8. How can you verify the existence of a package named Smya-Dial-Package?


a) rpm -q Smya-Dial-Package
b) dpkg -l Smya-Dial-Package
c) yum list Smya-Dial-Package
d) apt list Smya-Dial-Package

You might also like