219 Midterm Prep (quiz questions) Flashcards
Where can we find Linux?
Quiz 1
Basically everywhere lol if he asks this question click all of the above. The specific examples provided include:
Smart TV Systems
IoT Devices
NAS
Web Servers
What command is used to clear the terminal screen?
Quiz 1
clear
What linux shortcut combo breaks a currently running process?
Quiz 1
Ctrl-C
What command lists the content of the current folder in human-readable file size?
Quiz 1
ls -lh
ls: This command lists the folders in your current directory
-lh This portion of the command edits the output to be in human readable size.
What command is used to show the help file of the echo command?
Quiz 1
help echo
The “help” portion of the command opens the help file
The echo portion of the command specifies which help file to open up
Normally, the help file comes AFTER the command (for example ls –help), but in this specific case, it goes before hand to avoid being included as part of the echo coomand.
What command is used to bring up the commands that have been recently used?
Quiz 1
history
If you would like to bring up a specific number of previously used commands, prepend the history command with a number
example: history 7 will show the last 7 commands used.
What command is used to show the content of a specific file?
Quiz 1
cat (followed by specified file path)
What command is used to turn off a Linux computer?
Quiz 1
shutdown
You can add other commands after shutdown to affect when, and how the computer shuts off.
The example given in the quiz is shutdown 60 which turns the computer off after an hour
What command shows users currently logged in, including system users?
Quiz 1
“who” is used to show the users logged into the computer
-a added on to the coomand adds the system users to the output.
What command is used to display the calendar?
Quiz 1
cal is used to display the calendar
you can prepend the command with additions to change the output to a specific date / range of dates
What command allows you to execute commands as the root?
Quiz 1
sudo allows you to run commands as the root user (basically as administrator)
Q
How do you change to the root directory in Linux?
Quiz 1
cd /
cd changes to the directory specified in the second half of the command
/ signifies the beginning of a file path, also known as the root of the device