Linux Foundations Flashcards
Important facts regarding the Linux kernel(choose 3):
The kernel is found in /boot
Is based on the Mac OS
Provides GUI access for configuration
Allocates system resources to process
Should be spelled “Colonel”
Everything is a file
The kernel is found in /boot ✅
Allocates system resources to process ✅
Everything is a file ✅
Inside the /proc directory, you will find a separate directory for each instance of a running process.
True or False?
True ✅
True. The /proc directory in Linux contains a directory for each running process, named by its PID (Process ID). It’s a virtual filesystem providing an interface to kernel data structures
What is the function of /etc/skel/ directory?
It is a template directory for new users
It is a log of all current passwords to ensure there are no duplicates
It is the default directory for new users until they get other permissions
It is a log of who created which users for security accountability.
It is a template directory for new users ✅
Which command is used to make a shell variable to other executed programs.
env
export
export ✅
Ex: $ export greeting
$ export greeting=hey
Note: working with Global variable : To make a variable available to subprocesses, turn it form a local into a environment. The is doneby the command export. When invoked with the variable name, this is added to the shell’s environment:
Which of the following are stored in the /etc/passwd file (choose 4)?
username
expiration
user’s home directory
hashed password
UID (user ID)
default shell
username
user’s home directory
UID (user ID)
default shell
Select all of the files involved in Linux account configuration (choose 3).
/etc/shadow/
/etc/pwd
/etc/passwd
/var/run/accounts/
/var/log/system
/etc/group
The three files involved in Linux account configuration are:
/etc/shadow/
/etc/passwd
/etc/group
They manage user account information, including passwords and group memberships.
ex: $ cut -d “:” -f 1 /etc/passwd | sort -r | less
ex: $ wc /etc/passwd
What does this Linux command do:
cut -d “:” -f 1 /etc/passwd | sort -r | less
This command processes the /etc/passwd file in several stages:
cut -d “:” -f 1 /etc/passwd: Extracts the first field (username) from each line of the /etc/passwd file.
The -d “:” option specifies that fields are separated by colons.
sort -r: Sorts the usernames in reverse alphabetical order.
less: Displays the sorted usernames in a paginated view, allowing for easy navigation.
Which file on a Linux a system sets the maximum number of days before a password must be changed?
/etc/users
/etc/passwd
/etc/group
/etc/shadow
/etc/shadow ✅
The sticky bit permission…
prevents others from overwriting files they don’t own in common directories
changes the group ownership of existing files in a directory.
sets the group ownership of any new file created in a directory.
prevents other from removing files they don’t own from a common directory.
prevents other from removing files they don’t own from a common directory. ✅
$ls -ld Sample Directory/
drqqr-xr-t 2 carol carol 4096 Dec 28 18:46Sample_Directory/
ex:$ cd~
ex:$ sudo deluser jimbo
ex:$ ls -l 1*
Use the command to remove a directory (xyz) and all files within it.
rmdir xyz
rm -r xyz
rm * xyz
del . \xyz
rm -r xyz ✅
Which commands allows a file (xyz.sh) to execute (select 2)?
chmod a+w xyz.sh
chmod 755 xyz.sh
chown 777 xyz.sh
chmod +x xyz.sh
chmod 755 xyz.sh
chmod +x xyz.sh
What are the difference between a private web browser window and a regular web browser window? (Choose three.)
Private web browser windows do not keep records in the browser history.
Private web browser windows do not send regular stored cookies.
Private web browser windows do not store cookies persistently.
Private web browser windows do not allow printing or storing websites.
Private web browser windows do not keep records in the browser history. ✅
Private web browser windows do not send regular stored cookies.✅
Private web browser windows do not store cookies persistently. ✅
Use the following to install “tree” on a Ubuntu system.
sudo apt-install tree
sudo apt-get install tree
setup install tree /s
sudo install tree
sudo apt-get install tree ✅
This type of DNS record is the opposite of an “A” record
PTR
WWW
CNAME
MX
PTR ✅
ex:Total978 (kernel 0)
TCP: 4 9estab 0, closed 0, orphaned 0, synrecv 0, timewait 0/0), port 0
Transport Total—— IP —–IPv6
*——–0————- - ———— - —-
RAW–1———–0————–1——
Use this wildcard to replace a single character (Ex: is_inux)
#
*
?
%
? ✅
Multiple users can have the default group ID (GID).
True
False
True
Use the following command to rename a file in Linux
mv
cp
ren
rename
mv
Where did the kernel originate?
It originated at Apple for macOS.
Linus Torvalds created it.
It originated at Microsoft for Windows.
It originated at IBM.
Linus Torvalds created it. ✅
Which of the following are Linux desktop environments? (Choose all that apply.)
A. GTK+
B. GNOME
C. KDE Plasma
D. Evolution
E. Xfce
GNOME ✅
KDE Plasma ✅
Xfce ✅
If you want to enable one Linux computer to access files stored on another Linux
computer’s hard disk, which of the following network protocols is the best choice?
A. SMTP
B. NFS
C. PHP
D. DNS
E. DHCP
NFS (Network File System) ✅
NFS is specifically designed for file sharing over a network.
In which of the following languages was most of the Linux kernel written?
A. Bash shell script
B. Java
C. C
D. C++
E. Perl
C ✅
This language provides the low-level access to memory and system resources necessary for a robust operating system kernel.
True or false: OpenOffice.org forked from Calligra.
False ✅
OpenOffice.org was developed by Sun Microsystems
KOffice was developed by Calligra for KDE desktop envir.
True or false: Python is generally implemented as an interpreted language.
True ✅
A Linux server that handles the SMB/CIFS protocol normally runs the software.
A. ProFTPD
B. telnetd
C. named
D. Dovecot
E. Samba
Samba ✅
Samba is the software that allows Linux servers to handle SMB/CIFS protocols, facilitating file and print services to Windows clients.
A program written in a(n)/the programming language is completely converted
to binary form before being run.
A. Python
B. compiled
C. Javascript
D. interpreted
E. Perl
compiled ✅
You can install and manage various Linux software applications via a management system.
A. office
B. file
C. email
D. package
E. program
package ✅
What type of multitasking does Linux use?
A. Preemptive
B. Multiuser
C. Cooperative
D. Single-tasking
E. Single-user
Preemptive ✅
Which of the following programs is most likely to be installed and regularly used on a
desktop computer that runs Linux?
A. Apache
B. Postfix
C. Android
D. Evolution
E. BIND
Evolution ✅
Evolution is a personal information management application for emails, calendar events, and tasks, making it a useful program for a Linux desktop environment.
True or false: VMS was a common OS on x86 PCs at the time Linux was created.
False ✅
VMS X86 is a virtual machine (VM) that uses the x86 architecture and hardware-assisted virtualization capabilities:
True or false: A Linux computer being used as a server generally does not require X.
True. ✅
A Linux server typically does not require a graphical user interface (X), as it usually operates headlessly to conserve resources and enhance security. Most server management tasks are performed through the command line interface (CLI).
A type of software that’s distributed for free but that requires payment on the honor system
if a person uses it is called .
A. open source
B. commercial
C. freeware
D. shareware
E. virus
shareware ✅
The software package is an example of a web server written for the Linux server environment.
A. MySQL
B. LibreOffice
C. Firefox
D. GIMP
E. Apache
Apache ✅
Apache is indeed a web server software package written for the Linux server environment, widely used for hosting websites.
Raspberry Pi - Features
Specifications
CPU: RAM: Storage:
Specifications
CPU: 700 MHz -1.2 GHz RAM: 512 MB-1 GA SDRAM Storage: SD card
You are working as an IT manager. Your team is spending a lot of time doing infrastructure management. What is the ideal solution to reducing time in infrastructure management and increasing the time in actual software development?
Apply advanced hybrid principles for software development.
Hire additional team members to manage the infrastructure.
Use the managed services provided by a public cloud.
Use the build as a service concept.
Use the managed services provided by a public cloud.✅
You are working as a software developer and need to evaluate the operating system requirements. Your software is going to be deployed on the cloud. Which operating system is open source and can reduce the cost of overall software deployment on the cloud?
Linux
Windows 10
iOS
iO X
Linux✅
Correct: Correct! Linux is open source and can reduce the cost of overall software deployment on the cloud.✅
What keystroke moves the cursor to the start of the line when typing a command in Bash?
A. Ctrl+A
B. Left arrow
C. Ctrl+T
D. Up arrow
E. Ctrl+E
Ctrl+A
This keystroke moves the cursor to the beginning of the line in Bash. Ctrl+E would move it to the end.
How can you run a program in the background when launching it from a shell? (Choose all
that apply.)
A. Launch the program by typing start
command, where
command is the command that
you want to run.
B. Launch the program by typing bg
command, where
command is the command that you
want to run.
C. Append an ampersand (&) to the end of the command line.
D. Launch the program normally, press Ctrl+Z in the shell, and then type bg in the shell.
E. Launch the program normally, press Ctrl+Z in the shell, and then type fg in the shell.
Append an ampersand (&) to the end of the command line. ✅
Launch the program normally, press Ctrl+Z in the shell, and then type bg in the shell. ✅
- Which of the following commands is an improved version of more?
A. grep
B. html
C. cat
D. less
E. man
less
The less command is an improved version of more as it allows for both forward and backward navigation through a file.
True or false: Pressing Alt+F3 in the GUI brings up a text-mode display that you can use to
log into Linux.
False. Ctrl+Alt+F3 that brings up a text-mode display where you can log in.
Alt+F3 in a typical Linux GUI setup might switch to another virtual console, but it’s often
True or false: You can force man to display a man page in a specific section of the manual
by preceding the search name with the section number, as in man 5 passwd.
True
True or false: Info pages are a web-based documentation format.
False
True or false: Linux documentation in the /usr/share/doc directory tree is almost always
in OpenDocument text format.
False.
It is various formats, such as plain text, HTML, and PDF.
- Each document in an info page is known as a .
A. pager
B. site
C. node
D. link
E. level
node
The command searches a database of filenames, enabling you to identify files
quickly whose names match a term that you specify.
A. find
B. whereis
C. grep
D. rpm
E. locate
locate
The locate command searches a pre-built database of filenames, allowing you to quickly identify files whose names match your specified term.
Which command would you use to get the most information about your motherboard?
lspci
info
lspc
info_spec
lspc ✅
Which of the following commands would you type to rename newfile.txt to afile.txt?
A. mv newfile.txt afile.txt
B. cp newfile.txt afile.txt
C. ln newfile.txt afile.txt
D. rn newfile.txt afile.txt
E. touch newfile.txt afile.txt
mv newfile.txt afile.txt
The mv command is used to move or rename files in Linux. It renames newfile.txt to afile.txt.
You want to copy a directory, MyFiles, to a USB flash drive that uses the FAT filesystem.
The contents of MyFiles are as follows:
$ ls MyFiles/
contract.odt
outline.pdf
Outline.PDF
The USB flash drive is mounted at /media/usb, and so you type cp -a MyFiles/
/media/usb. What problem will occur when you attempt to copy these files?
A. The command will fail because it tries to create links.
B. The MyFiles directory will be copied, but none of its files will be copied.
C. One file will be missing on the USB flash drive.
D. One file’s name will be changed during the copy.
E. Everything will be fine; the command will work correctly.
One file will be missing on the USB flash drive.
The FAT filesystem is case-insensitive, so it won’t differentiate between outline.pdf and Outline.PDF. As a result, one of those files will overwrite the other.