Ubuntu Lab
Ubuntu Lab
This lab will involve practicing some commands in Terminal interface provided by
Ubuntu OS (Unix type OS).
2. Use the mkdir command to make a new directory (folder) called unixstuff in your
home folder by typing mkdir unixstuff
3. What is the command you have to type in in order to see if the directory you have
just created exists? Try it. I used ls -l and my new folder called unixstuff
was listed.
The cd (it stands for change directory) command is used to move within the files and
folders structure on the computer
4. To change your current location into the directory you have just made type in
cd unixstuff and press enter
5. How do you check that you are currently located in the unixstuff directory?
Because now ~/unixstuff is showing before the $
6. To move one level up in the folders structure you have created use the command
cd .. Try it. You current working folder should be now the home folder.
OS_CW3_UI_Unix
7. Move back into the unixstuff subdirectory using cd command.
8. Create a new empty file using the touch command. touch fileone.txt
9. You now want to copy, using the command “cp”, the file fileone.txt that you just
created to make a duplicate file called filetwo.txt
Practice and see what happens when you use the command
When I use this command a new file with the name “filetwo.txt” is created in my
cp fileone.txt filetwo.txt unixstuff folder. I checked it going back to my unixstuff directory and tried the
command ls. Which was showing my two files inside my unixstuff folder.
10. Practice the echo command to see what it does. Hint: read the help manual.
OS_CW3_UI_Unix