There are 3 main parts to a Linux CLI syntax, what are they, in order? (2 answers)
Command, ___________, ____________
Options, Arguements
As a regular user, what command would you use to list all files, including hidden ones, in /var?”
sudo ls -la /var OR sudo ll -a /var
What command is used to display file permissions on objects within a directory?
ll
OR
ls -l
What command creates an empty file named example.txt?
touch example.txt
What animal is the Linux mascot?
Penguin
This command is placed before another command to run it with elevated (administrator) privileges, often resolving ‘Permission denied’ errors for users who are allowed to use it.
sudo
Using brace expansion, how would you make 3 directories named ~/RHEL8, ~/RHEL9, ~/RHEL10?
mkdir ~/RHEL{8..10}
How would you show the permission of a directory named /Tests?
ll -d /Tests
What command is used to create a directory named Projects?
mkdir Projects
What is the name of the Linux mascot?
Tux
This directory contains configuration files for most services.
/etc
What command and option would create the directory structure ~/School/Labs in a single step, assuming neither directory exists?”
mkdir -p ~/School/Labs
What command would you use to change the permissions of a file or directory?
chmod
What command would recursively delete a directory named /misc and all its contents?
rm -r /misc
What Linux distribution is specifically designed for penetration testing and ethical hacking?
Kali Linux
Which text editor comes installed by default on RHEL and have we practiced using?
VI/VIM
How would you display the last 10 lines of a file named log.txt?
tail log.txt
chown
You misnamed a file "drafts" as "drfts". How would you rename the file with the correct name?
mv drfts drafts
This person created the Linux kernel in 1991.
Linus Torvalds
If you are currently in /var, what type of path (absolute or relative) would you use to change into the directory, /var/log?
Relative
cd log
Put these in the correct order to create the user shakenbake111 with the comment ‘Ricky Bobby’.
-c | useradd | "Ricky Bobby" | sudo | shakenbake111
sudo useradd -c "Ricky Bobby" shakenbake111
For a regular file, what does the numeric permission 2660 grant to user/group/others (UGO)?
Users can r/w
Group can r/w, with special execute
Others can do nothing
From your home directory, how would you copy a file named myfile into ~/Stuff/ and name the copy draft_file1?”
cp myfile ~/Stuff/draft_file1
This is the open-source “shell” commonly used on Linux systems like RHEL.
bash