FX1 * Flashcards

1
Q

Question: What are the differences between hard disk drives and solid-state disks? (Choose two.)

A. “Hard disks can fail due to physical damage, while solid state disks cannot fail.”
B. “Solid state disks can store many times as much data as hard disk drives.”
C. “/dev/sda is a hard disk device while /dev/ssda is a solid state disk.”
D. “Solid state disks provide faster access to stored data than hard disks.”
E. “Hard disks have a motor and moving parts, solid state disks do not.”

A

Explanation:

✅ D: Solid-state drives (SSDs) are much faster than traditional hard disk drives (HDDs) because they use flash memory with no moving parts, reducing access time.
✅ E: HDDs use spinning platters and a motor, while SSDs rely on electronic circuits, making them more durable and efficient.
❌ A: SSDs can fail, although differently from HDDs. They wear out due to limited write cycles rather than mechanical failures.
❌ B: SSDs do not inherently store more data than HDDs. In fact, HDDs often have higher storage capacities at a lower cost.
❌ C: The /dev/sda device name is used for any primary disk, regardless of whether it’s an HDD or SSD.

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

Question: Which Linux distribution is best for a team familiar with Red Hat Enterprise Linux but wants a free alternative?

A. “CentOS”
B. “Debian GNU/Linux”
C. “Ubuntu Linux LTS”
D. “openSUSE”
E. “Raspbian”

A

Explanation:

✅ A: CentOS is a free, community-supported version of Red Hat Enterprise Linux (RHEL), making it ideal for those experienced with RHEL.
❌ B, C, D, E: Debian, Ubuntu, openSUSE, and Raspbian are not based on RHEL, so they have different package management systems and configurations.

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

Question: How is the reverse DNS name for IP 198.51.100.165 stored?

A. “In the A record for 165.100.51.198.ipv4.arpa.”
B. “In the REV record for arpa.in-addr.198.51.100.165.”
C. “In the RNAME record for 198-51-100-165.rev.arpa.”
D. “In the ARPA record for 165.100.51.198.rev.”
E. “In the PTR record for 165.100.51.198.in-addr.arpa.”

A

Explanation:

✅ E: Reverse DNS uses a PTR record, which maps an IP address to a hostname. The format follows the in-addr.arpa domain convention.
❌ A, B, C, D: These answers incorrectly describe how reverse DNS works. The proper record type is PTR, not A, REV, RNAME, or ARPA.

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

Question: Which type of bus connects hard disk drives to the motherboard?

A. “The RAM bus”
B. “The NUMA bus”
C. “The Auto bus”
D. “The CPU bus”
E. “The SATA bus”

A

Explanation:

✅ E: SATA (Serial ATA) is the standard interface used to connect hard drives and SSDs to the motherboard.
❌ A, B, C, D: The RAM bus is for memory, NUMA is a CPU architecture, there is no “Auto bus,” and the CPU bus does not connect storage devices.

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

Question: Which command resolves a DNS name to an IP address?

A. “dnsname”
B. “query”
C. “dns”
D. “iplookup”
E. “host”

A

Explanation:

✅ E: The host command queries DNS servers to resolve domain names to IP addresses.
❌ A, B, C, D: These are not valid Linux commands for DNS resolution. The correct alternatives would be nslookup or dig

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

Question: What information does the top command display?

A. “User accounts, ordered by the number of files.”
B. “Running processes, ordered by CPU or RAM consumption.”
C. “User accounts, ordered by the number of logins.”
D. “User groups, ordered by the number of members.”
E. “Existing files, ordered by their size.”

A

Explanation:

✅ B: The top command is used to monitor active system processes, showing CPU and RAM usage.
❌ A, C, D, E: These refer to user accounts, groups, or files, which are not shown by top.

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

Question: Which of the following outputs is from the free command?

A. “21:04 up 14 days, 7:43, 3 users, load average: 0.89, 1.00, 0.99”
B. “avg-cpu: %user %nice %system %iowait %steal %idle…”
C. “Filesystem Size Used Avail Use% Mounted on…”
D. “120K /tmp”
E. “total used free shared buff/cache available…”

A

Explanation:

✅ E: The free command shows memory usage, including used, free, and available memory.
❌ A, B, C, D: These belong to other commands like uptime, iostat, df, and du.

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

Question: What is true about the dmesg command? (Choose two.)

A. “It might not display older information because it was overwritten by newer information.”
B. “It sends messages to the command lines of all current user sessions.”
C. “It traces the execution of a command and shows each step the program carries out.”
D. “It displays the content of the Linux kernel’s ring buffer.”
E. “It immediately outputs all new messages written to the system journal.”

A

Explanation:

✅ A: The dmesg buffer is limited, and old messages may be overwritten.
✅ D: dmesg shows the kernel ring buffer, including boot logs and hardware messages.
❌ B, C, E: These describe different logging and debugging functions.

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

Question: Which command output comes from last?

A. “1 ls\n 2 cat text.txt\n 3 logout”
B. “Password for user last changed at…”
C. “Last login: Fri Mar 23 10:56:39 2018 from…”
D. “EXT4-fs(dm7): mounted filesystem…”
E. “root tty2 Wed May 17 21:11 - 21:11 (00:00)”

A

Explanation:

✅ E: The last command shows login history.
❌ A-D: These outputs come from other commands like history, passwd, who, and system logs.

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

Question: What is true about the owner of a file?

A. “The user owning a file must be a member of the file’s group.”
B. “The owner of a file cannot be changed once it is assigned to an owner.”
C. “Each file is owned by exactly one user and one group.”
D. “The owner of a file always has full permissions when accessing the file.”
E. “When a user is deleted, all files owned by the user disappear.”

A

Explanation:

✅ C: In Linux, each file has exactly one owner (a user) and one group.
❌ A, B, D, E: File ownership can be changed (chown), owners don’t need to belong to the group, and a user can lose permissions on their own files. Deleting a user does not delete their files by default.

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

Question: What is the UID of the root user?

A. “255”
B. “0”
C. “1”
D. “-1”
E. “65536”

A

Explanation:

✅ B: The UID (User ID) of the root user is always 0 in Linux.
❌ A, C, D, E: Other values represent non-root users or invalid UIDs

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

Question: What permissions are set on a regular file with chmod 654 file.txt?

A. “d—wxr-x–”
B. “drw-r-xr–”
C. “–rwxrw—x”
D. “–wxr-x–x”
E. “-rw-r-xr–”

A

Explanation:

✅ E: 654 sets the file permissions to rw- (6) r-x (5) r– (4) (Owner: Read/Write, Group: Read/Execute, Others: Read).
❌ A-D: These permissions do not match the correct octal value.

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

Question: Which tar options enable compression? (Choose two.)

A. “-z”
B. “-g”
C. “-z2”
D. “-bz”
E. “-j”

A

Explanation:

✅ A: -z enables gzip compression.
✅ E: -j enables bzip2 compression.
❌ B, C, D: These are incorrect or non-existent tar options.

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

Question: What are the default permissions of the /tmp/ directory?

A. “rwX”
B. “rwxrwxrwt”
C. “r-xr-X–t”
D. “rwSrw-rw-“
E. “rwxrwS—”

A

Explanation:

✅ B: /tmp/ has the sticky bit (t), which means only the file owner can delete files.
❌ A, C, D, E: These are incorrect permission settings for /tmp/.

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

Question: What information is stored in /etc/passwd? (Choose three.)

A. “The user’s default shell”
B. “The user’s storage space limit”
C. “The username”
D. “The numerical user ID”
E. “The encrypted password”

A

Explanation:

✅ A, C, D: /etc/passwd contains username, UID, and default shell.
❌ B: Storage limits are handled by quotas.
❌ E: Passwords are in /etc/shadow, not /etc/passwd.

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

Question: Which command adds a new user and creates a home directory?

A. “useradd –m tux”
B. “defaultuser tux”
C. “useradd –o default tux”
D. “passwd –a tux”
E. “usercreate tux”

A

Explanation:

✅ A: useradd -m creates a user and a home directory.
❌ B-E: These are incorrect or invalid commands.

17
Q

Question: How do you create a work.tar archive from ./work/?

A. “tar work > work.tar”
B. “tar work.tar < ./work/”
C. “tar –new work.tar ./work/”
D. “tar –cf work.tar ./work/”
E. “tar –create work.tgz –content ./work/”

A

Explanation:

✅ D: tar -cf is the correct syntax (-c for create, -f for file name).
❌ A, B, C, E: These commands have incorrect syntax.

18
Q

Question: How can the script test.sh be executed? (Choose two.)

A. “bash test.sh”
B. “${test.sh}”
C. “cmd ./test.sh”
D. “./test.sh”
E. “run test.sh”

A

Explanation:

✅ A, D: You can run a script by calling it with bash or executing it directly (./test.sh).
❌ B, C, E: These commands are incorrect or non-existent.

19
Q

Question: Which key exits less?

A. “l”
B. “e”
C. “q”
D. “!”
E. “x”

A

Explanation:

✅ C: Pressing q quits less.
❌ A, B, D, E: These do not exit less.

20
Q

Question: What keyword starts a loop in a shell script?

A. “for”
B. “forloop”

A

Explanation:

✅ A: The for loop is a standard shell script loop.
❌ B: “forloop” is not a valid keyword.