In: Computer Science
Using Linux in VirtualBox Do the Following Exercise:
Using the clear command
At this point, you screen might seem filled with commands and their results. Use the clear command anytime you want a clean slate. This exercise enables you to clear the screen now.
To clear the screen:
Viewing manual pages
You can use the manual pages to learn more about a command or program (if the program is documented in the manual pages). In addition, the whatis command provides a quick summary of specific command and programs. You use both the man and whatis command in this exercise. The database for the whatis command should already be created prior to using the command.
To display online help using man:
To display a brief description of a command with the whatis command:
Editing command-line input
[Do all 11 steps, but there is no need to record the output for your report.]
Entering multiple commands
You can execute multiple commands on one command line by using a semicolon between commands. You will practice running multiple commands in this assignment.
To enter multiple commands on the command line:
Using command history
In this assignment, you will use the command history capability of the Bash shell to recall commands you have used earlier. As you’ll discover the more you use Linux, this command can save a lot of time otherwise spent on repeated typing.
To use the command-line history:
Changing your password
Your password is your means to protect your user account from others who might attempt to access it without your authorization. Plan to change your password often to keep your account secure. In this assignment, you will learn how to change your password.
To change your password:
[Do steps 1-4, but there is no need to record the output for your report.]
Using the cat command
The cat command has several purposes, but one of the most commonly used is to view the contents of a file. For example, in this assignment, you use the cat command to view a file called shells that resides in the /etc directory. This file contains a list of valid shell programs available through Linux.
To use cat to view the shell’s file:
Redirecting command-line output to a file
You already used the who command to find out who is logged in to the computer. In this assignment, you will use the same command with the > redirection symbol to save this information in a text file.
To save a file that lists the persons logged into the system:
Redirecting calendar output to a file
You can also use the redirection symbol with the cal command to save a calendar in a text file. For example, assume that you are involved in a development project with a projected deadline in the year 2018. You can save the calendar in a text file.
To save the year 2018 calendar in a file.
[Do steps 1-3, but there is no need to record the output for your report.]
Creating a new file with information you type in
As you work with Linux, suppose you remember that your instructor asked you to complete a few tasks by the end of the week. In this project, you will create a notes file to serve as a task reminder using the cat command with the > redirection symbol.
To create a new file:
After you create the notes file, let’s say you remember that your instructor also asked you to complete another task. You can append this second reminder to the existing notes file. You also want to include the appropriate monthly calendar in the file for reference.
To add information to an existing file:
Type q to exit the file
Type man who in the command line, and press Enter. Do you see the explanation of the who command?
Yes as shown in the screenshot it will open help manual for who command
-M path, --manpath=path
By default, man uses manpath derived code to determine the path to
search. This option overrides the $MANPATH environment variable and
causes option -m to be ignored.
test@test-VirtualBox:~/canvas-lms$ whatis who
who (1) - show who is logged on
shell
*******
if you have any doubt then please ask me without any hesitation in the comment section below , if you like my answer then please thumbs up for the answer , before giving thumbs down please discuss the question it may possible that we may understand the question different way and we can edit and change the answers if you argue, thanks :)