Linux Flashcards

1
Q

What is the BIOS?

A

BIOS (Basic Input/Output System) initializes and tests hardware components when you turn on your computer and helps to start the main operating system.

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

What is the Boot Loader?

A

A boot loader is a small program stored that helps load and start your computer’s operating system.

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

What is a Kernel?

A

A kernel is the core component of an operating system that manages system resources, such as CPU, memory, and devices. It acts as an intermediary between software applications and the hardware, enabling programs to run smoothly and efficiently on your computer.

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

What is systemd?

A

systemd is a tool in Linux that helps start and manage programs and services when your computer turns on.

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

What is systemctl?

A

systemctl is a command-line tool used to control the systemd system and service manager. It allows you to start, stop, and check the status of services.

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

What is the Filesystem Hierarchy Standard (FHS)

A

The Filesystem Hierarchy Standard (FHS) is a set of guidelines that define the structure and organization of directories in Linux and Unix-like operating systems. It ensures consistency across distributions.

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

What command is used to type out a file?

A

cat

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

What command is used to show the first few lines of a file?

A

head

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

What command is used to show the last few lines of a file?

A

tail

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

What command is used to view documentation?

A

man

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

How to halt the system?

A

shutdown -h

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

How to reboot the system?

A

shutdown -r

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

What command is used to type out a file with line numbers?

A

cat -n

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

What is the purpose of the pipeline (|)

A

The pipeline is a symbol (|) used to connect two or more commands and redirect the output of one command as the input of the next command. It allows you to combine multiple commands and perform complex operations on the output of one command.

Example:
ls | grep .txt

This command lists all the files and directories in the current directory using the ls command, and then pipes the output to the grep command. The grep command searches the input for lines that contain the string “.txt”, and displays them as the output. Therefore, the final output of the above command will be a list of all the files in the current directory that have the “.txt” extension.

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

What is the find command used for?

A

The find command is used to search for files and directories. It searches the file system in real-time and shows you the most current information about the file system. It’s slower than locate.

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

What is the locate command used for?

A

The locate command is used to search for files and directories using a pre-built database. It’s faster than find but may not show you the most up-to-date information about the file system.

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

What is apt-get in Linux?

A

apt-get is a package management tool used to install, update, and remove packages in Debian-based systems.

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

What is apt-cache in Linux?

A

apt-cache is a tool used to search and display information about packages in the Debian package repository cache.

syntax: apt-cache [options] command [package]
example: apt-cache search git

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

What is used to manage Debian-based systems?

A

apt

20
Q

What is used to manage RPM based Red Hat systems?

A

dnf

21
Q

What is used to manage openSUSE systems?

A

zypper

22
Q

What is the touch command in Linux used for?

A

The touch command is used to create a new file or update the modification time of an existing file.

23
Q

What is a process?

A

A process is an instance of one or more related threads executed on a computer.

24
Q

What is PID?

A

PID stands for Process ID. It’s a unique identification number assigned to each process running on a computer system.

25
Q

What is PPID?

A

PPID stands for Parent Process ID. It’s the PID of the process that created a given process. PPID is used to organize processes into a hierarchy, where child processes inherit certain attributes from their parent processes.

26
Q

What is TID?

A

TID stands for Thread ID. It’s a unique identification number assigned to each thread of execution within a process. TIDs are used to manage and coordinate the execution of multiple threads within a process.

26
Q

How do you terminate a process in Linux?

A

You can terminate a process in Linux using the kill command with the SIGKILL signal. The basic syntax of the kill command with the SIGKILL signal is:

kill -SIGKILL [PID]

27
Q

What does the top command do?

A

The top command is a real-time system monitoring tool that displays a list of processes and their resource usage on a Linux system.

28
Q

What does the uptime command do?

A

The uptime command displays how long a Linux system has been running, as well as the average system load over different time intervals.

29
Q

What does the ps command do?

A

The ps command is a command-line tool for displaying information about running processes on a Linux system. By default, it shows the processes running under the current user account.

To show all processes running on the system, use the -e option

30
Q

What is Cron in Linux?

A

Cron is a time-based scheduler in Linux that allows you to automate repetitive tasks on your system. You can create a Cron job to run a command or script at a specific time or interval, such as once a day or every hour. Cron is a powerful tool for automating system tasks and improving your productivity.

31
Q

What does the mount command do in Linux?

A

The mount command in Linux is used to attach a file system to a directory in the file system hierarchy. It allows you to access files and directories stored on a device, such as a hard drive, USB drive, or CD-ROM, by connecting it to a directory on your system.

32
Q

What is NFS in Linux?

A

NFS stands for Network File System, which is a protocol used in Linux to share directories and files between computers over a network.

33
Q

What is the purpose of the /home directory in Linux?

A

The /home directory in Linux is used to store the personal files and directories of user accounts on the system. Each user has a subdirectory in /home that is named after their username.

34
Q

What is the purpose of the /bin directory in Linux?

A

The /bin directory in Linux is used to store essential binary files that are required for the system to boot and operate properly.

35
Q

What is the purpose of the /sbin directory in Linux?

A

The /sbin directory is used to store binary files that are required for system administration tasks. These files are used for system-level functions, such as mounting file systems and configuring the network.

36
Q

What is the purpose of the /dev directory in Linux?

A

The /dev directory in Linux is used to store device files that represent physical and virtual devices connected to the system.

37
Q

What is the purpose of the /var directory in Linux?

A

The /var directory in Linux is used to store variable data files that change frequently during system operation. This includes log files and temporary files.

38
Q

What is the purpose of the /etc directory in Linux?

A

The /etc directory in Linux is used to store system configuration files.

39
Q

What is the purpose of the /boot directory in Linux?

A

The /boot directory in Linux is used to store files that are required for the system to boot properly.

39
Q

What is the purpose of the /boot directory in Linux?

A

The /boot directory in Linux is used to store files that are required for the system to boot properly.

40
Q

What is the purpose of the /lib directory in Linux?

A

The /lib directory in Linux is used to store shared library files that are required by system programs and other applications.

41
Q

What is the purpose of the /mnt directory in Linux?

A

The /mnt directory in Linux is used as a mount point for temporary file systems that are not automatically mounted during system boot. This can include external file systems, network file systems, or file systems created on demand.

42
Q

What is the purpose of the diff command in Linux?

A

The diff command in Linux is used to compare the contents of two text files and highlight any differences between them.

43
Q

What is the ‘nano’ text editor, and how do you open a file with it in Linux?

A

Nano is a user-friendly, lightweight command-line text editor in Linux. To open a file, type nano filename in the terminal, replacing ‘filename’ with the name of the file you want to edit.