Operating Systems Concepts & Design
bob
crew
sudo
make me a sandwichBeginning with this lab, you will be accessing an AWS instance - a virtual system hosted on the cloud - to access a Ubuntu server environment.
Go to your cloned repository folder (likely named ceg2350s25-yourgithubusername
).
Create a new directory, Lab02
Create a file named README.md
in the Lab02
folder. Copy into the file the contents of the Lab 02 Template.
You may refer to additional resources outside of the recommended resources provided.
Any resource that you use that contributes to your understanding of exercises in this lab should be cited in the Citations
section of your lab answers. To add citations, provide the site and a summary of what it assisted you with. If generative AI was used, include which generative AI system was used and what prompt(s) you fed it.
If you make mistakes with commands in the lab, note them! Writing down what went wrong and what the correction was will significantly help your learning journey. If you cannot find a correction, it will help the TAs or myself understand what point you reached and determine some potential solutions.
For this course, you will be creating and editing files in Linux. Therefore, you will need to get acquainted with at least one command line text editor. vim
will be the editor used in course demonstrations.
vim
nano
An email was sent to your wright.edu account inviting you to join an AWS Academy Course for this class.
Follow the instructions in AWS Academy to set up your AWS environment and make your first ssh
connection to your AWS instance.
The written instructions are thorough, but if you would like more visuals visit the Pilot -> Content -> Labs -> Getting Started for a video companion guide to creating an instance. The video guide sets up connections with WSL2 specifically, but PowerShell or other Terminals will have similar themes - know where you put your file, the name of it, and the system path to it.
Wherever your lab instructions state that the exercise must be completed in your instance, it must be completed in your instance.
If you break your ability to connect to your instance, you can rebuild by repeating the instructions in AWS Academy Setup.
You will note your command to SSH to your instance in the Lab Template.
The remainder of this lab is to be completed by using your AWS instance.
For each command below, write a verbose description of what it does.
Sample:
chmod 777 file.txt
No credit: “It does 777”
chmod, man
chmod u+r bubbles.txt
chmod u=rw,g-w,o-x banana.cabana
chmod a=w snow.md
chmod 751 program
chmod -R ug+w share
Resources
bob
For these exercises, replace bob
with a username based on your first initial followed by last name. For example, “John Smith” would be jsmith
Perform the following exercise on your AWS instance.
adduser, sudo, su, chown, pwd, cd, whoami, exit
bob
(replace with your username, see above)bob
’s home
directory?ubuntu
add files to bob
’s home directory? Why or why not?
bob
bob
’s home
directorybob
add files to bob
’s home directory? Why or why not?
ubuntu
user
ubuntu
user does not have an account password. You’ll have to find a more administrative way to switch accounts…ubuntu
user’s home
directorycrew
Perform the following exercise on your AWS instance.
Create a folder named share
in the ubuntu
user’s home
directory and create some files in the folder to play with.
Reminder to replace references to bob
with your username of first initial, last name (ex. jsmith
)
addgroup, usermod, chown, chgrp, su, sudo, mkdir
crew
ubuntu
and bob
to the crew
group (replace with your username, see note)share
in the ubuntu
user’s home
directory so that crew
is the group for the whole folder and members of crew
can make changes in the folder.
share
bob
bob
create a file in share
.useradd
adduser
in the lab, but this is a great breakdown of the pieces adduser
uses and useradd
needs you to specifysudo
make me a sandwichPerform the following exercise on your AWS instance.
sudo
ubuntu
user’s home
directory, make a file with sudo
named sudowho.txt
ubuntu
the owner and crew
the group associated with the file.Resources
sudo
ubuntu
user has passwordless sudo - as in you won’t be prompted for your account password. If you try sudo
in the terminal on your machine, you will be prompted for a passwordLab02
folder in your GitHub repo