Lab 1
Lab 1
April 4, 2023
1. List all files and directories that present in your working directory.
2. Create a file called file1 and write “Hello Ubuntu” in it through the shell, then display the content of this
file through the shell.
3. Create another file called file2 and write “This is the second file” in it, through the shell, then copy the
contents of file1 and file2 into another new file called file3.
5. Create 10 directories called temp1, temp2, .., temp10 with only one command, move them all to your
Downloads directory with only one command
1
6. Navigate to the root directory then navigate to the root home directory and create a file called “temp”
and write “Here is the root’s home” in it, then return to the home using only the needed command and
one word after it.
7. Change the primary prompt of the secondary shell to “Enter Command: ” and secondary prompt of the
secondary shell to “» ” then return to the primary prompt.
2
9. Create 10 folders called temp1, temp2, temp3, ..., temp10 with one command, then delete them all using
one command.
10. Search for the word “Hello” in every le in your home directory using one command
3
11. List all the special devices in your system
12. List all the home directories of the users that present in your system
13. Display only the login names and the number of users logged on.
14. Create two new users called “Ali” and “Rami” then delete the user “Rami”
4
15. Show the process hierarchy in your system.