,1. Multiple Choice: Which command is used to display the
amount of free and used memory in the system?
a) free
b) top
c) vmstat
d) memshow
ANS: a) free
Rationale: The 'free' command is used in Linux to display the
total amount of free and used physical and swap memory in the
system, as well as the buffers used by the kernel.
2. Fill-in-the-Blank: The _______ command is used to compare
two files line by line.
ANS: diff
Rationale: The 'diff' command is used to perform a line-by-line
comparison of the contents of two files.
3. True/False: The 'grep' command can only be used to search for
strings in text files.
ANS: False
, Rationale: The 'grep' command is a powerful utility available on
Linux systems that can search for strings not only in text files but
also in any stream of text, such as pipeline outputs.
4. Multiple Response: Which of the following are valid I/O
redirection operators in Bash?
a) >
b) <<
c) %>
d) &
ANSs: a) >, b) <<
Rationale: In Bash, '>' is used for output redirection, and '<<' is
used for here documents. The other options are not valid I/O
redirection operators in Bash.
5. Multiple Choice: What is the purpose of the 'chroot' command
in Linux?
a) Change the root directory
b) Change file permissions
c) Change user ownership of a file
d) Change the hostname
ANS: a) Change the root directory
, Rationale: The 'chroot' command changes the root directory to
that specified in the command. This is often used for system
maintenance or to run a program in a separate filesystem.
6. Fill-in-the-Blank: To search for a specific process using its ID,
the _______ command followed by the process ID can be used.
ANS: ps
Rationale: The 'ps' command is used to display information
about active processes. When used with a process ID, it can
provide details about that specific process.
7. True/False: The 'ls' command can be used to list the contents of
a directory, including hidden files.
ANS: True
Rationale: The 'ls' command lists the contents of a directory.
When used with the -a option, it includes hidden files (those
starting with a dot) in the listing.
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller Bankart. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $15.49. You're not tied to anything after your purchase.