AI1601 OS Pratice in Class
AI1601 OS Pratice in Class
AI1601 OS Pratice in Class
A file will be saved into your Desktop with name of virtual machine name + timestamp.
Exercise 1:
In the console or terminal window, type the following LINUX commands on the command
line. Note and write down the results. Capture the screen of result.
$ who
$ cd ~
$ ls
$ pwd
$ ps
$ cd ..
$ pwd
$ cd /usr/local
$ ls
Exercise 2:
Execute the following command and explain the meaning of each of them. Capture the
screen of result.
• ifconfig
• route –n
• hostname
• cat /proc/cpuinfo
• free –m or top => Ctrl + C to terminate
• dpkg ‐l
• uname –r
Exercise 3:
In your home folder (cd ~), create a folder tree as following. Note that, the rectangular
describes a folder and the circle represent for a file. You can add any information into your
created files.
- Create file Hello.java in folder Java and add whatever you want into that file.
- Copy file Hello.java to folder OS and rename it to newHello.txt
Capture the screen of result.
Exercise 4:
- Create a file named user.txt. Then, you add n usernames (each in one line, n>=5). (cat >)
- Display the content of file user.txt (cat )
- Display list of n sorted usernames in your file and store that sorted list into a new file
named suser.txt (sort)
- Count the number of users in your file and display it.
Capture the screen of result.