Answered step by step
Verified Expert Solution
Question
1 Approved Answer
PLEASE FOLLOW THE INSTRUCTIONS CAREFULLY. THE TEACHER WANTS THE SOURCE CODE AND SCREENSHOTS OR NO CREDIT : ) ) . THANKS!!! For this lab /
PLEASE FOLLOW THE INSTRUCTIONS CAREFULLY. THE TEACHER WANTS THE SOURCE CODE AND SCREENSHOTS OR NO CREDIT : THANKS!!!
For this labtutorial you need to create a script, a file that is used to take a copy of everything that is output to the terminal and place it in a log file. First, you need to open your terminal, which you can do by pressing the Ctrl Alt, and T keys together CtrlAltT
Use the cd command to move to the home directory.
$ cd home
Launch the script. The Linux script command creates a typescript file from your terminal session.
$ script M Lab hit enter
Enter these commands at your Linux prompt, and try to interpret the output:
Enter these commands at your Linux prompt, and try to interpret the output:
$ echo hello world
$ passwd you need to change your password; Ctrlc takes you back to the prompt
$ date
$ hostname
$ arch
$ uname a
$ dmesg more you may need to press q to quit
$ uptime
$ whoami
$ who
$ id
$ last
$ finger
$ w
$ echo $SHELL
$ man ls you may need to press q to quit
$ man who you may need to press q to quit
$ echo conpresentfersed
$ clear
$ cal
$ cal do you notice anything unusual?
$ bc l type quit or press Ctrld to quit
$ yes please you may need to press Ctrlc to quit
$ time sleep
$ history
Try the following command sequence:
$ cd
$ pwd
$ ls al
$ cd
$ pwd where did that get you?
$ cd
$ pwd
$ ls al
$ cd
$ pwd what happens now?
$ cd etc
$ ls al more
$ cat passwd
$ cd
$ pwd
Continue to explore the file system tree using cd ls pwd and cat. Look in binusrbinsbintmp and boot What do you see?
Make subdirectories called work and play.
Delete the subdirectory called work.
Copy the file etcpasswd into your home directory.
Move it into the subdirectory play.
Create a file called hello.txt that contains the words "hello world."
Delete the work directory and its contents with one command.
Experiment with the options on the ls command. What do the d i R and F options do
Change the terminal prompt using the command PS"First name Timothy Last nameRhyne
To stop the script file, simply type exit at the command prompt. Now your script is ready for submission.
Note: To make your script file accessible from your host side, you need to create a shared folder follow the steps below The simplest option to transfer files between your host PC and a virtual machine is to set up a shared clipboard andor drag and drop.
Select your virtual machine Ubuntu rightclick and select "Settings."
In the window that pops up click on "General" and then click on the "Advanced" tab.
You should now see the "Shared Clipboard" and "Drag n Drop" dropdown options.
You can choose from "Host to Guest" and "Bidirectional" There's also the default option, "Disables," which prevents your attempts to copy files to VirtualBox.
Select "Bidirectional" in both dropdown boxes to enable twoway file sharing.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started