Lab4-Linux Partition-22F
.pdf
keyboard_arrow_up
School
Algonquin College *
*We aren’t endorsed by this school
Course
CST8101
Subject
Computer Science
Date
Apr 3, 2024
Type
Pages
19
Uploaded by CaptainField13890
Lab 4 CST8101 – Computer Essentials ©Algonquin College March 24, 2024 Page 1
of 19
Linux partition Due date: at the end of your lab period Note: all commands in this lab will be used during quizzes and exams. Mark: 10 7 screenshots and 3 question Marking scheme: Missing any snapshot or wrong answer for each question would cost 1 mark Purpose:
Create a Linux clone
create and remove MBR partitions
from a Linux Virtual Hard Disk (2 GB)
change Sudo password
(administrator password)
install the tree
application Procedure: Important: - in this lab, we will be using the Linux clone in case you mess things up. there are some questions in the lab, make sure you answer the questions in RED and have snapshots of your work. All commands in this lab are lowercase. Create a clone of your Linux os Please turn on and log in to your Ubuntu. You are learning how to shut down
Linux through the command line (
Terminal).
How to shutdown your Ubuntu in the command line or terminal: First, log in to your Ubuntu. On your Ubuntu desktop press
Ctrl+alt+T at the same time. That takes you to the Terminal screen. On the user prompt type: sudo shutdown -h now press enter (all lower case) (
exam
) Provide the user password
now your VM is off and you are on the VM main page.
Lab 4 CST8101 – Computer Essentials ©Algonquin College March 24, 2024 Page 2
of 19
3-In your VM screen select VM => Manage => Clone
To create a clone
partition. Click Next Click Next After going through the default setting the clone type
screen comes up, select Create a full clone click
Next
Lab 4 CST8101 – Computer Essentials ©Algonquin College March 24, 2024 Page 3
of 19
Click Next Then
finish The cloning process takes a few minutes Click Close
Adding a new virtual hard drive (2 GB) to the clone VM Select (highlight) your Linux clone
from your VM library and add a new virtual hard disk. Double click on your VM hard Disk (SCSI),
this brings up the Virtual Machine
Settings as shown in Figure 1 below
. Note: your hard drive type may not be SCSI, which is ok.
Lab 4 CST8101 – Computer Essentials ©Algonquin College March 24, 2024 Page 4
of 19
Figure 1 Double Click on the Hard Disk (SCSI) Select the Hard Disk
and click on the Add button; located at the bottom of the screen on the left-hand side. This brings up the Add Hardware
Wizard
, see Figure 2. Select the Hard Disk and click the Next button. Figure 2 Add Hardware Wizard. Accept the default options from the Select a
Disk Type
Menu and click the Next
button. Select the Create a new virtual disk
radio button and click the Next
button. Select a Maxim disk size of
2 GB
and choose the Store virtual disk as a single file
, as shown in Figure 3 below.
Lab 4 CST8101 – Computer Essentials ©Algonquin College March 24, 2024 Page 5
of 19
Figure 3 Hard Disk Size. Click the Next
button and accept the default name for the disk file. Click Finish.
You will now be taken to the Virtual Machine Settings
menu, and you should see a 2 GB drive displayed. Click the OK button.
Lab 4 CST8101 – Computer Essentials ©Algonquin College March 24, 2024 Page 6
of 19
Screenshot 1
: showing 2 GB drive (
1 Mark) your name Figure 1 ““
Power on the Virtual Machine (Clone Ubuntu)
and log on to your Linux VM. Exercise 1: Viewing existing partitions from Terminal (clone) On the Ubuntu desktop screen, press the Ctrl + alt +T
buttons at the same time. That takes to the terminal
screen. Switch to the root user
(administrator) with the command: sudo -s – root press enter When prompted enter your root password (user password) and hit enter
, remember nothing will show
on the screen when you type your password.
(
Exam
). Linux is a case-sensitive operating system. Note
: the prompt user has been changed from ~$ to ~
# (sudo prompt) (
Exam)
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Related Questions
QUESTION 8
emulator: noname.exe
file math debug view external virtual devices virtual drive help
step back
ID
single step
Load
reload
run
step delay ms: 100
registers
0722:0000
0722:0000
L
07220: 9A 154 ül
07221: 23 035 #
07222: 76 118 v
07223: 34 052 4|
07224: 12 018 ±
07225: B8 184 ©
07226: 00 000 NI
CALL 01234h:07623h
MOV AX, 04CO0h
INT 021h
NOP
NOP
NOP
AX 00 00
BX 00 00
01 2A
DX 00 00
CS
0722
IP
0000
debug stack
flags
screen
source
reset
aux
vars
A712
Based on the above screenshot, answer the following questions:
(1) How many bytes of the machine code of the CALL 1234H:7623H instruction?
(2) After the CALL 1234H:7623H instruction is executed, what are the new values of IP & CS?
(3) After the CALL 1234H:7623H instruction is executed, what data are saved onto stack?
arrow_forward
plase jelp me
arrow_forward
Problem 3
A radar speed gun is a device used in law-enforceme✗measure the speed of moving vehicles in miles
per hour. The measured speeds are supposed to be stored in a file, one number per line, as follows:
65.6
70.2
54.9
Unfortunately, due to an intermittent fault, occasionally multiple numbers are written on a single line as
follows:
73.2 65.6 69.8
Furthermore, occasionally the radar gun outputs a single stray character such as: 67.9z, 6$4.9, or a3.9, to
illustrate just a few.
Given a file that has radar speed gun readings, write a function averageSpeed() to calculate the average of
the numbers in the file. Your code must adhere to the following specifications:
a. Prompt the user for the name of the input file to process. When the user enters a nonexistent file
name, give the user a second chance. After two wrong entries in a row, quit the program with an
appropriate message.
b. Ignore numbers containing stray characters.
Ignore any reading for slow vehicles moving at 2 miles per…
arrow_forward
Linux bin bash script to create a new user on your Linux system and assign the user to a group. The script will first check if the user and group exists. If the user exists, provide a message saying the user exists. If the user doesn’t exist, create the group, if it doesn’t exist, and then create the user, finally assign the user to the group. Move the script to /home//scripts/ directory. Change the group to techstaff. Set appropriate permissions.
arrow_forward
Creating Directories (Folders), Subdirectories, and Files
Open the CMD window
Move to the upper most directory (the root): CD\
Create a new directory and name it as: YourLastName
Change directory to YourLastName : CD YourLastName
Inside YourLastName directory create the following Subdirectories:
CIS100
CIS115
CIS120
CIS165
CIS200…
arrow_forward
MINIX Programming - Please provide screenshots of what was changed so I can read it better and how to find the file
Modify the MINIX 3 scheduler to keep track of how much CPU time each user process has had recently. When no task or server wants to run, pick the user process that has had the smallest share of CPU.
I don't need it explained, I need help with the actual code and what files need changed
Faster than answer
arrow_forward
Explain in detail what you feel a file extension is and what purpose you believe it serves. Take the time to go to a random folder on your computer and identify three file extensions you see there, along with any software packages that may have created them. By simply right-clicking on a selected file and selecting properties from the pop-up menu, most file extensions should be shown (Microsoft Windows environment).
arrow_forward
Powershell ISE
You have been given a zip file containing several subdirectories and within each subdirectory is a PDF and an image file. Your task is to write a script that will move all the PDF files into a directory called PDF and the images into a directory called images. Your script should create the top level folders (images and pdf) and move all the files.
arrow_forward
System AdministrationShell Scripts: exercises sheet 2Exercise 1 :Write a shell script that displays the contents of the directories existing in a directory given asargument (use the for loop)Exercice 2 :Write a shell script that displays the contents of subdirectories of the directories that are given asarguments. The script should be called with any number of parameters.Exercice 3 :Write a shell script that displays the nthline of a file(you can use head and tail). The integer n andthe input file name are given by the user in response to the request of the script (use the commandread). Try to do all possible tests (file exists or not etc ...)Exercise 4 :Write a shell script that give a variable x the following content “School man women fish dog catsheep” and then print each word in a separate line on the screen (use the for loop).Exercise 5 :Propose a shell script that displays the number of files in the present working directory .
arrow_forward
File Management: UNIX
Describe what happens for each of the following uses of the 'mv' command:
moving a regular file onto an existing regular file
moving a directory onto an existing regular file
moving a directory onto another existing directory
moving a directory onto a subdirectory within itself
SHOW THE CODE, Like the script of it
arrow_forward
Explain a file extension's purpose. Choosing a folder at random on your computer, name three file extensions found there and the software that created them. The majority of file extensions may be seen by selecting properties after right-clicking on a file (Microsoft Windows environment).
arrow_forward
M 10
TRUE
FALSE
ios::app
erases the old
contents of a
file when
used
at the
beginning of
a file the flag
eof() is
ifstream
declares files
that we can
write on
close() is
used to close
the graphics
window
data
structures
can have
members of
different
tynos
arrow_forward
MINIX Programming - Please provide screenshots of what was changed so I can read it better and how to find the file
Modify the MINIX 3 scheduler to keep track of how much CPU time each user process has had recently. When no task or server wants to run, pick the user process that has had the smallest share of CPU.
DO NOT COPY AND PASTE SOME GENERAL ANSWER FROM SOMEWHERE ELSE
arrow_forward
CLI is locked
arrow_forward
Virtual memory (also known as a page file) is a block of space on your hard drive or solid-state drive allocated by the OS.You can manage virtual memory, e.g. in a Windows system. See the link for detailed steps to manage the virtual memory:https://www.crucial.com/support/articles-faq-memory/virtual-memory-settings-suggestions.What happens if the size of the virtual memory is too small or too big? Discuss the case when the size of the virtual memory is too small or too big.
arrow_forward
System Administration
Shell Scripts: exercises sheet 2
Exercise 1:
Write a shell script that displays the contents of the directories existing in a directory given as
argument (use the for loop)
Exercice 2:
Write a shell script that displays the contents of subdirectories of the directories that are given as
arguments. The script should be called with any number of parameters.
Exercice 3:
Write a shell script that displays the nth line of a file(you can use head and tail). The integer n and
the input file name are given by the user in response to the request of the script (use the command
read). Try to do all possible tests (file exists or not etc...)
Exercise 4:
Write a shell script that give a variable x the following content "School man women fish dog cat
sheep" and then print each word in a separate line on the screen (use the for loop).
Exercise 5:
Propose a shell script that displays the number of files in the present working directory.
arrow_forward
Trig-
How to force/trigger a file system check on next reboot?
arrow_forward
Data Communication Channels in Computer Systems
Explain (with the aid of diagrams as appropriate) how you would write a procedure using commands stored in a Windows batch file to copy all the contents of a specific folder on a user’s computer to another folder on an external hard drive.
NOTE: The data backup should occur once every day at a specific time; Furthermore, assume that the files to be copied are stored in a directory called “D:\my_files” and that these files must be copied to a directory called “E:\backup”.
arrow_forward
File Edit Format View Help
What is a deadlock?
Consider two threads,write a java program to create a deadloack and
write a seperate java program to avoid dead lock.Screen Shot of
Output
arrow_forward
SEE MORE QUESTIONS
Recommended textbooks for you
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
Systems Architecture
Computer Science
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Cengage Learning
LINUX+ AND LPIC-1 GDE.TO LINUX CERTIF.
Computer Science
ISBN:9781337569798
Author:ECKERT
Publisher:CENGAGE L
Related Questions
- QUESTION 8 emulator: noname.exe file math debug view external virtual devices virtual drive help step back ID single step Load reload run step delay ms: 100 registers 0722:0000 0722:0000 L 07220: 9A 154 ül 07221: 23 035 # 07222: 76 118 v 07223: 34 052 4| 07224: 12 018 ± 07225: B8 184 © 07226: 00 000 NI CALL 01234h:07623h MOV AX, 04CO0h INT 021h NOP NOP NOP AX 00 00 BX 00 00 01 2A DX 00 00 CS 0722 IP 0000 debug stack flags screen source reset aux vars A712 Based on the above screenshot, answer the following questions: (1) How many bytes of the machine code of the CALL 1234H:7623H instruction? (2) After the CALL 1234H:7623H instruction is executed, what are the new values of IP & CS? (3) After the CALL 1234H:7623H instruction is executed, what data are saved onto stack?arrow_forwardplase jelp mearrow_forwardProblem 3 A radar speed gun is a device used in law-enforceme✗measure the speed of moving vehicles in miles per hour. The measured speeds are supposed to be stored in a file, one number per line, as follows: 65.6 70.2 54.9 Unfortunately, due to an intermittent fault, occasionally multiple numbers are written on a single line as follows: 73.2 65.6 69.8 Furthermore, occasionally the radar gun outputs a single stray character such as: 67.9z, 6$4.9, or a3.9, to illustrate just a few. Given a file that has radar speed gun readings, write a function averageSpeed() to calculate the average of the numbers in the file. Your code must adhere to the following specifications: a. Prompt the user for the name of the input file to process. When the user enters a nonexistent file name, give the user a second chance. After two wrong entries in a row, quit the program with an appropriate message. b. Ignore numbers containing stray characters. Ignore any reading for slow vehicles moving at 2 miles per…arrow_forward
- Linux bin bash script to create a new user on your Linux system and assign the user to a group. The script will first check if the user and group exists. If the user exists, provide a message saying the user exists. If the user doesn’t exist, create the group, if it doesn’t exist, and then create the user, finally assign the user to the group. Move the script to /home//scripts/ directory. Change the group to techstaff. Set appropriate permissions.arrow_forwardCreating Directories (Folders), Subdirectories, and Files Open the CMD window Move to the upper most directory (the root): CD\ Create a new directory and name it as: YourLastName Change directory to YourLastName : CD YourLastName Inside YourLastName directory create the following Subdirectories: CIS100 CIS115 CIS120 CIS165 CIS200…arrow_forwardMINIX Programming - Please provide screenshots of what was changed so I can read it better and how to find the file Modify the MINIX 3 scheduler to keep track of how much CPU time each user process has had recently. When no task or server wants to run, pick the user process that has had the smallest share of CPU. I don't need it explained, I need help with the actual code and what files need changed Faster than answerarrow_forward
- Explain in detail what you feel a file extension is and what purpose you believe it serves. Take the time to go to a random folder on your computer and identify three file extensions you see there, along with any software packages that may have created them. By simply right-clicking on a selected file and selecting properties from the pop-up menu, most file extensions should be shown (Microsoft Windows environment).arrow_forwardPowershell ISE You have been given a zip file containing several subdirectories and within each subdirectory is a PDF and an image file. Your task is to write a script that will move all the PDF files into a directory called PDF and the images into a directory called images. Your script should create the top level folders (images and pdf) and move all the files.arrow_forwardSystem AdministrationShell Scripts: exercises sheet 2Exercise 1 :Write a shell script that displays the contents of the directories existing in a directory given asargument (use the for loop)Exercice 2 :Write a shell script that displays the contents of subdirectories of the directories that are given asarguments. The script should be called with any number of parameters.Exercice 3 :Write a shell script that displays the nthline of a file(you can use head and tail). The integer n andthe input file name are given by the user in response to the request of the script (use the commandread). Try to do all possible tests (file exists or not etc ...)Exercise 4 :Write a shell script that give a variable x the following content “School man women fish dog catsheep” and then print each word in a separate line on the screen (use the for loop).Exercise 5 :Propose a shell script that displays the number of files in the present working directory .arrow_forward
- File Management: UNIX Describe what happens for each of the following uses of the 'mv' command: moving a regular file onto an existing regular file moving a directory onto an existing regular file moving a directory onto another existing directory moving a directory onto a subdirectory within itself SHOW THE CODE, Like the script of itarrow_forwardExplain a file extension's purpose. Choosing a folder at random on your computer, name three file extensions found there and the software that created them. The majority of file extensions may be seen by selecting properties after right-clicking on a file (Microsoft Windows environment).arrow_forwardM 10 TRUE FALSE ios::app erases the old contents of a file when used at the beginning of a file the flag eof() is ifstream declares files that we can write on close() is used to close the graphics window data structures can have members of different tynosarrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Programming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:CengageMicrosoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,Systems ArchitectureComputer ScienceISBN:9781305080195Author:Stephen D. BurdPublisher:Cengage Learning
- LINUX+ AND LPIC-1 GDE.TO LINUX CERTIF.Computer ScienceISBN:9781337569798Author:ECKERTPublisher:CENGAGE L
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
Systems Architecture
Computer Science
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Cengage Learning
LINUX+ AND LPIC-1 GDE.TO LINUX CERTIF.
Computer Science
ISBN:9781337569798
Author:ECKERT
Publisher:CENGAGE L