• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 3 out of 18 pages
Exam (elaborations)

TestOut Linux Pro Exam2 Questions Solved 100% Correct | Verified Solutions

Document preview thumbnail
Preview 3 out of 18 pages

TestOut Linux Pro Exam2 Questions Solved 100% Correct | Verified Solutions

Content preview

TestOut Linux Pro Exam2 Questions Solved 100%
Correct | Verified Solutions

/etc/shells - ✔✔If a shell type is installed, it will be listed in the /etc/shells file. You
can switch to any shell by typing the shell's name. For example, type ksh within any shell
to switch to the Korn shell.



echo $SHELL - ✔✔The echo $SHELL command returns the default or preferred shell.
The environment $SHELL holds the user's preferred shell which is typically set in
/etc/passwd. For example, if bash is the user's preferred shell, $SHELL will hold the
value, /bin/bash. The preferred shell does not change when you switch shell types.



echo $0 - ✔✔The echo $0 command can be used to return the current shell type. The
special variable $0 normally holds the command used to start a script. A shell session is
initiated by a script. Consequently, $0 will hold the name of the script which is
consistent with the shell type. For example, $0 in a console session running bash might
hold the value -bash, $0 in a terminal application opened from a desktop menu might
hold the value bash. When you type ksh, the ksh script is run, a Korn shell session is
opened and $0 will hold the value ksh.



all shells share some common characteristics: - ✔✔The shell provides a command
line interface that allows the user to interact with the Linux kernel.
A Linux system can run multiple shell sessions at the same time.
One shell session can run within another shell session. This may be done interactively,
such as when a user starts a second shell from the first shell's command line, or
automatically, by scripts or programs.
Shells use configuration files to establish their operating environments.



bash shell default command line prompt - ✔✔The username of the current user

,The @ symbol
The hostname
A space
The base name of the current working directory



~ - ✔✔If the current working directory is the home directory (the default directory
when the user first logs in), the tilde symbol (~) is displayed instead.



# character - ✔✔indicates that the current user is the root user.



$ character - ✔✔indicates that the current user is a normal user.



$PATH environment variable - ✔✔contains the set of directories that are searched
when you type an executable file at the shell prompt.
The shell does not look in the current working directory for the executable file.
To see the list of directories, type echo $PATH at the shell prompt.
To add a directory to a path, type PATH=$PATH:[directory_path] and then type export
PATH.



Type the filename at the shell prompt. (run an executable) - ✔✔Resides in a directory
that is included in the $PATH environment variable



Type ./ followed by the filename. (run an executable) - ✔✔Resides in the current
working directory and the current directory is not included within the path environment
variable

, Type the full path to the executable file. (run an executable) - ✔✔Does not reside in
the current working directory and its directory is not included within the path
environment variable



file names and paths - ✔✔are case sensitive



Linux shell history of commands - ✔✔The commands are stored as a history queue
within the hidden .bash_history file in your home directory.
Press the Up and Down keys to scroll through your previously typed commands.You can
edit the command or re-run it as is by pressing Enter.



Type history - ✔✔to display the commands stored in the history queue.



Type history -c - ✔✔to clear the history queue.



Tab - ✔✔The commands are stored in the .bash_history file in your home directory.
After typing the beginning of a command, file, or directory, press Tab to complete it.
If pressing Tab does not fully complete the command, file, or directory, press Tab
again.If there is no matching command, file, or directory name, your command entry
will not change.If there is more than one matching command, file, or directory name, a
list of all matches will be displayed to help you resolve your command entry.



pwd - ✔✔Shows the present working directory.



whoami - ✔✔Displays the current username.



uname - ✔✔Prints system information. The uname command has the following
options:

Document information

Uploaded on
January 13, 2025
Number of pages
18
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers
$13.49

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
QUINTER
3.6
(73)
Sold
425
Followers
105
Items
39867
Last sold
1 day ago




Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions