0% found this document useful (0 votes)
50 views2 pages

ORS216D 2024 Practical1

Uploaded by

twisisanik
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
50 views2 pages

ORS216D 2024 Practical1

Uploaded by

twisisanik
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

ORS216D 2024 Practical Lab1

The following instructions should be run from Linux Ubuntu platform or from
https://cloud.google.com/shell (google account required).

1. Display the current directory.


1. Display the current username.
2. Create a directory called “Games”
3. Do not move from the current directory and create a file called “Boss” in the
“Games” directory.
4. Using one command create a file called “history” and write the following into the
file: “This is the history of all commands:”.
5. Change to “Games” directory.
6. Change to “/etc” directory
7. List all files and directories with their detail’s information from “/etc” directory.
8. Now change to home directory without using a pathname.
9. Now change to “/etc” directory without using a pathname.
10. List all directories, files and hidden files with all their details information from your
home directory without using a pathname.
11. Now stay where you are, using “~” symbol, create in your home directory in one
command the following directories: “dir1” and “dir2/dir3”. “dir3” is a sub directory
of “dir2”.
12. Using “adduser” command, create a user “paul” and specify the full name as “Paul
Phoenix” and password “p1234”, leave other parameters empty.
13. Using “adduser” command, create a user “kim” and specify the full name as “Kim
Kaphwan” and password “k4321”, leave other parameters empty.
14. Display the last 4 users’ information from “/etc/passwd” file.
15. Display the first 4 groups’ information from “/etc/group” file.
16. Display the last 2 users’ information from “/etc/shadow” file.
17. Remain where you are, copy “history” file and “Games” directory from your home
directory into Paul’s home directory without using the home’s pathname.
18. Delete the “history” file from Paul’s directory.
19. Change Paul’s “other” parameter to “computer science” and “Work phone”
parameter to “0123456789” using one command.
20. Switch to root user.
21. As root user, change the password of user “kim” as “kof2000”
22. Add user “kim” into Paul’s group.
23. Add user “kim” into sudo group.
24. Switch to user “kim” and change to Kim’s home directory without using the home
pathname.
25. List all files and directories (including hidden files) from Paul’s home directory
without using the home pathname.
26. Change user “kim” home directory to Paul’s home directory.
27. Switch to YOUR USER account.
28. Change to your home directory.
29. Enter the command “history >> history” to populate the file.
30. Rename the “history” file to your student number.

Send your “history” file to your lecturer’s email address.

You might also like