Before you begin
- Labs create a Google Cloud project and resources for a fixed time
- Labs have a time limit and no pause feature. If you end the lab, you'll have to restart from the beginning.
- On the top left of your screen, click Start lab to begin
Learn more about commands
/ 1
Explore the useradd command
/ 1
Explore the rm and rmdir commands
/ 1
Determine which command to use
/ 1
As a security analyst, you won’t have all the answers all the time, but you can learn where to find them. One of the great things about Linux is that you can get help right through the command line.
In this lab activity, you’ll use the man and whatis commands to get information on other commands and how they work. You’ll also use the apropos command to search the manual page for a command with a specified string.
When working as a security analyst, you'll likely find it useful to know how to discover which command to use or information about what commands do.
With that in mind, let’s explore your scenario.
In this scenario, you have to find more information about commands that you need to use. You also need to discover which command to use to perform a certain task.
Here’s how you’ll do this task: First, you’ll explore a few commands you can use in the shell to learn more about other commands. Next, you’ll find an option you need to add to a command. Third, you’ll use a command to get a brief description of commands so you can identify their differences. Finally, you’ll identify the command you need to perform a task.
It's time to get ready to explore some of the Linux help resources!
You'll need to start the lab before you can access the materials. To do this, click the green “Start Lab” button at the top of the screen.
After you click the Start Lab button, you will see a shell, where you will be performing further steps in the lab. You should have a shell like this:
When you have completed all the tasks, refer to the End your Lab section that follows the tasks for information on how to end your lab.
In this task, you need to explore a few commands you can use in the shell to learn more about the functionality of other commands.
First, imagine you can’t quite remember what the cat command does and want a quick reminder.
whatis command to get a short description of cat.Next, imagine that you want more details about cat and all of its options.
man command to get more details about cat.The man command returns a general description of cat and information about each of its options:
When the first page of information returned by man is displayed, the output pauses.
Now, imagine you’ve remembered there’s a command that prints just the first part of a file, but you can’t remember the exact command. The apropos command is useful in these instances. You can use keywords with apropos to find a command.
apropos to find a command that returns the first part of a file:apropos in terms of keywords. Think of it as a very focused search. It will only return commands that correspond to keywords you supply. Keep trying if the first returned command does not provide what you need. Also, keep in mind that using the -a option will limit results to only those commands that match all keywords supplied.
Click Check my progress to verify that you have completed this task correctly.
In this task, imagine that you want to set the expiration date for a temporary user account. You know that you need to use the useradd command for this, but you’re not quite sure how to complete the task. You realize it might involve adding an option to the command.
useradd command and learn more about all of its options.Click Check my progress to verify that you have completed this task correctly.
In this task, you need to determine the difference between the rm and rmdir commands.
Imagine that you’ve used these commands before, but you can’t remember how they’re different.
rm and one with rmdir .
Click Check my progress to verify that you have completed this task correctly.
In this task, imagine that you need to create a new group but you can’t remember what command to use. You need to identify a command that will do this by searching for it through keywords. In this case, use the keywords create new group.
Click Check my progress to verify that you have completed this task correctly.
Great work!
You now have practical experience in using basic Linux Bash shell commands to
man pages for a command, andThis ability will be valuable as you navigate the Linux command line.
Before you end the lab, make sure you’re satisfied that you’ve completed all the tasks, and follow these steps:
This content is not currently available
We will notify you via email when it becomes available
Great!
We will contact you via email if it becomes available
One lab at a time
Confirm to end all existing labs and start this one