To type more than one command on a single line use what? Right Ans - the
semicolon `;`
Which command displays the type of a file? Right Ans - file command
What key combination can you use to insert the last word of the previous
command at the cursor's current location? Right Ans - Alt + .
Hold down Alt and press . to cycle earlier commands
Conditional command execution with && Right Ans - If the First command
executes SUCCESSFULLY then execute the Second command.
Conditional command execution with || Right Ans - If the First command
FAILS to execute then execute the Second command.
Which directory contains installed software programs and libraries? Right
Ans - /usr
Universal system resources
Which directory contains non-persistent process runtime data? Right Ans
- /run
Which directory contains regular commands and utilities? Right Ans -
/usr/bin
Which command returns you to the previous working directory? Right Ans
- cd -
How to create a variable and assign a value to it? Right Ans -
Command substitution Right Ans - method to execute a sub-command
within a larger command $(cmd) or `cmd`
Common section of the Linux Manual Right Ans - 1 - User commands
5 - For config files
8 - Sysadmin commands
, Which output redirection operator sends output and errors to the same file
and preserves the file content if it exists? Right Ans - >> file 2>&1
How you can list all shell variables that are currently set? Right Ans - with
the set command
How to temporarily change your primary group? Right Ans - use the
newgrp group_name
Your primary group will return in a new session.
How to implement a password aging policy? Right Ans - use the chage
command.
How to force a password change on the first login for the user? Right Ans -
chage -d 0 user_name
What command to use to modify file and directory permissions? Right Ans
- chmod Who/What/Which file|directory
Where is the system's default umask value is defined? Right Ans - in the
/etc/profile and /etc/bashrc files
Which state represents a process that released all of its resources except its
PID? Right Ans - Z (Zombie)
How to bring a background job to the foreground? Right Ans - use fg
%job_number
How to signal one or more processes that match selection criteria? Right
Ans - use pkill command
How to list user
logins and currently running processes? Right Ans - use w
How to list all service
units regardless of the activation states? Right Ans - systemctl list-units --
type=service --all
How to see the state of all
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
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 LeCrae. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $11.99. You're not tied to anything after your purchase.