Which of the following commands shows the absolute path to the current working directory?
The command pwd stands for ''print working directory''. It will print the absolute path of the current working directory to the terminal.For example, if we are currently in the /home/user/directory, it will print out that exact path1.The pwd command is useful for finding out where we are in the file system hierarchy and for verifying the location of files and directories2.
The other options are not commands that show the absolute path to the current working directory.The who command shows the users who are currently logged in to the system3.The cd ... command changes the current working directory to the parent directory of the current one2.The ls -l command lists the files and directories in the current working directory in a long format, which shows the permissions, ownership, size, date, and name of each file and directory2.The cd ~/home command changes the current working directory to the /home directory under the user's home directory, which may or may not exist2.Reference:
Linux Essentials Exam Objectives, Version 1.6, Topic 103.1, Weight 2
Linux Essentials Certification Guide, Chapter 3, Page 51-52
How to Get the current directory in Linux- howtouselinux
How To Find The Absolute Path Of A File Or Directory In Linux- systranbox
Reverse DNS assigns hostnames to IP addresses. How is the name of the IP address 198.51.100.165 stored
on a DNS server?
Reverse DNS lookups query DNS servers for a PTR (pointer) record; if the server does not have a PTR record, it cannot resolve a reverse lookup. PTR records store IP addresses with their segments reversed, and they append ''.in-addr.arpa'' to that. For example, if a domain has an IP address of 192.0.2.1, the PTR record will store the domain's information under 1.2.0.192.in-addr.arpa.In IPv6, the latest version of the Internet Protocol, PTR records are stored within the ''.ip6.arpa'' domain instead of '.in-addr.arpa.'1Therefore, the name of the IP address 198.51.100.165 is stored in the PTR record for 165.100.51.198.in-addr.arpa.Reference:1: Reverse DNS lookup - Wikipedia1
When typing a long command line at the shell, what single character can be used to split a command across multiple lines?
The backslash character () is used to escape the meaning of the next character in a command line. This means that the next character is treated as a literal character, not as a special character. For example, if you want to use a space in a file name, you can use a backslash before the space to prevent the shell from interpreting it as a separator. Similarly, if you want to split a long command line across multiple lines, you can use a backslash at the end of each line to tell the shell that the command is not finished yet. The shell will ignore the newline character and continue reading the next line as part of the same command. For example, you can write:
ls -l
/home/user/Documents
instead of:
ls -l /home/user/Documents
Both commands will produce the same output, but the first one is easier to read and type.Reference:
Linux Essentials - Linux Professional Institute (LPI), section 2.1.2
2.1 Command Line Basics - Linux Professional Institute Certification Programs, slide 7.
What can be found in the /proc/ directory?
The /proc/ directory is a virtual file system that contains information about the system and the processes running on it. It is not a conventional file system that stores files on a disk, but rather a dynamic view of the kernel's data structures. One of the features of the /proc/ directory is that it contains one subdirectory for each process running on the system, which is named after the process ID (PID). For example, the subdirectory /proc/1/ contains information about the process with PID 1, which is usually the init process. The process subdirectories contain various files that provide information about the process, such as its status, memory usage, open files, environment variables, command line arguments, and more. The /proc/ directory also contains a symbolic link called 'self', which points to the process that is accessing the /proc/ file system. Therefore, the correct answer is D. One directory per running process.
The other options are incorrect because:
A . One directory per installed program. This is not true, as the /proc/ directory does not contain information about installed programs, but only about running processes. Installed programs are usually stored in other directories, such as /bin/, /usr/bin/, /opt/, etc.
B . One device file per hardware device. This is not true, as the /proc/ directory does not contain device files, but only virtual files that represent kernel data. Device files are usually stored in the /dev/ directory, which is another special file system that provides access to hardware devices.
C . One file per existing user account. This is not true, as the /proc/ directory does not contain information about user accounts, but only about processes. User accounts are usually stored in the /etc/ directory, which contains configuration files, such as /etc/passwd/ and /etc/shadow/, that define the users and their passwords.
E . One log file per running service. This is not true, as the /proc/ directory does not contain log files, but only information files. Log files are usually stored in the /var/log/ directory, which contains various files that record the activities of the system and the services.
The /proc Filesystem --- The Linux Kernel documentation
A Beginner's Guide to the /proc File System in Linux - Tecmint
Appendix E. The proc File System Red Hat Enterprise Linux 6 | Red Hat ...
Chapter 5. The proc File System Red Hat Enterprise Linux 4 | Red Hat ...
proc file system in Linux - GeeksforGeeks
What information can be displayed by top?
The top command is a Linux command that shows the running processes on the system. It provides a dynamic real-time view of the system performance and resource usage. The top command can display various information about the processes, such as their process ID, user, priority, state, CPU and memory usage, command name, and more. The top command can also sort the processes by different criteria, such as CPU or RAM consumption, by using the interactive commands. The top command is useful for monitoring the system load and identifying the processes that are consuming the most resources.Reference:
Linux Essentials Topic 104: The Linux Operating System, section 104.3: Basic features and commands of the Linux standard shells.
Linux Essentials Topic 106: Security and File Permissions, section 106.4: Monitor and manage Linux processes.
Brenda Garcia
15 days agoKevin Baker
10 days agoSandra Martinez
10 days agoStephen Sanchez
9 hours agoChristopher Rodriguez
13 days agoJulio
1 month agoJacqueline
1 month agoHeidy
2 months agoMica
2 months agoMitzie
2 months agoClare
2 months agoKaitlyn
3 months agoFelice
3 months agoDarrin
3 months agoMarion
3 months agoFrank
4 months agoDenna
4 months agoKaycee
4 months agoDetra
4 months agoBettye
5 months agoFrancesco
5 months agoWillard
5 months agoLuis
5 months agoBenedict
6 months agoGabriele
6 months agoMalinda
6 months agoFrederica
6 months agoRashad
7 months agoMarta
7 months agoLorrine
7 months agoTawna
7 months agoRichelle
8 months agoTayna
8 months agoNobuko
8 months agoSkye
8 months agoFiliberto
10 months agoVince
11 months agoHeike
11 months agoDominque
11 months agoWillie
12 months agoEura
1 year agoMalcom
1 year agoJina
1 year agoDanilo
1 year agoMa
1 year agoWinifred
1 year agoBarney
1 year agoMyong
1 year agoLizbeth
1 year agoCarla
1 year agoRuth
1 year agoGeraldo
1 year agoJoye
1 year agoNickolas
1 year agoHeike
1 year agoStanton
1 year agoDalene
1 year agoStarr
1 year agoLoren
1 year agoSophia
1 year agoBernardo
1 year agoDelsie
1 year agoTasia
2 years agoKrissy
2 years agoRolland
2 years agoAdelina
2 years agoJanet
2 years agoLaila
2 years agoRodrigo
2 years agoAlyce
2 years agoGeorgene
2 years agoFranklyn
2 years agoCatarina
2 years agoMerilyn
2 years agoDesirae
2 years agoLore
2 years agoMaile
2 years agoVerdell
2 years ago