Linux administration Flashcards

1
Q

What command is used to check the system’s uptime?

A

uptime

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How do you view the currently logged in users?

A

who or w

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the purpose of the ‘top’ command in Linux?

A

displays system processes and their resource usage

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How do you check the system’s load average?

A

uptime or w command.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What command is used to view the system’s hardware information?

A

lshw or lspci command.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How do you add a new user in Linux?

A

adduser or useradd command.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the purpose of the ‘sudo’ command?

A

Allows users to execute commands with superuser privileges.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How do you change the password for a user in Linux?

A

passwd [username] command.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the purpose of the ‘passwd’ command?

A

Changes user password.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How do you give a user administrative privileges in Linux?

A

sudo usermod -aG sudo [username].

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How do you configure a static IP address in Linux?

A

Edit the network configuration file or use ip command.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What command is used to view the system’s IP address configuration?

A

ifconfig or ip addr show command.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the purpose of the ‘ifconfig’ command?

A

Displays network interface information.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What command is used to view the system’s disk space usage?

A

df command.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How do you restart a network service in Linux?

A

sudo systemctl restart [service] or sudo service [service] restart.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How do you add a new group in Linux?

A

groupadd command.

15
Q

How do you set up a firewall in Linux?

A

Using iptables command or firewall management tools like ufw.

16
Q

How do you check the status of a service in Linux?

A

systemctl status [service] command.

16
Q

What is the purpose of the ‘iptables’ command?

A

Manages firewall rules.

17
Q

What command is used to start a service in Linux?

A

systemctl start [service] command.

18
Q

How do you configure automatic system updates in Linux?

A

Configure automatic updates through package manager settings.

19
Q

What is the purpose of the ‘cron’ service?

A

Schedules tasks to run at specified times.

20
Q

How do you schedule a task to run at a specific time using cron?

A

Editing the cron jobs using crontab -e command.

21
Q

What is the purpose of the ‘rsync’ command in Linux?

A

Synchronizes files and directories between two locations.

22
Q

How do you check for available software updates in Linux?

A

apt update or yum update command.

23
Q

What is the purpose of the ‘apt’ command?

A

Manages software packages in Debian-based distributions

24
Q

How do you install a package in Debian-based Linux distributions?

A

sudo apt install [package].

25
Q

How do you install a package in Red Hat-based Linux distributions?

A

sudo yum install [package].

26
Q

What command is used to uninstall a package in Linux?

A

sudo apt remove [package] or sudo yum remove [package].