0% found this document useful (0 votes)
241 views3 pages

Lab 01 - OS

This document provides instructions for 4 exercises on basic Linux commands and file/directory management for an Operating Systems course lab, including commands to navigate directories, view system information, create a folder structure and files, sort and copy file contents, and requirements to save results and submit the completed lab work.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
241 views3 pages

Lab 01 - OS

This document provides instructions for 4 exercises on basic Linux commands and file/directory management for an Operating Systems course lab, including commands to navigate directories, view system information, create a folder structure and files, sort and copy file contents, and requirements to save results and submit the completed lab work.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Nguyễn Tiến Mạnh HE130478 SE1308

LAB 01 – OS
Course: OPERATING SYSTEM
Instructor: Luong Duy Hieu, [email protected]

Exercise 1:

In the console or terminal window, type the following LINUX commands on the command line.

Note and write down the results

$ ls

list all directories and files in the current directory


$ pwd

show the current directory


$ps

displays information about a selection of the active processes


$ cd ..

go to the parent directory


$ pwd

show the current directory


$ cd /usr/local

change directory to /usr/local


$ ls

list all directories and files in the current directory


Exercise 2:

Execute the following command and explain the meaning of each of them.
• ifconfig

ifconfig (interface configuration) is used to configure, or view the


configuration of a network interface
• route –n

show or manipulate the IP rounting table. Show only numerical


addresses
• hostname

show the set of system’s hostname


• fdisk –l

show the partition disk table of the device


• cat /proc/cpuinfo

concatenate file and print the output


• free –m or top

display the free memory in megabyte


• dpkg ‐l

list the package installed


• uname –r

print the kernel release information


Exercise 3:

In your home folder, 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.

Home folder

Semester1 Semester2

OS NW Java SR
Hello.java

- 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

Exercise 4:

- Create a file named user.txt. Then, you add n usernames (each in one line, n>=5).

- Display the content of file user.txt

- Display list of n sorted usernames in your file and store that sorted list into a new file named
suser.txt

- Count the number of users in your file and display it.

Submission:
You should capture the result screen of each exercise and include in your completed file.
Create the directory with a name like <class>-<name><roll number>-Lab-01,
e.g. SE0412-QuangTV00456-Lab01
Copy all your exercise files to that folder.
Compress the folder to .zip file (with the same name) and upload to CMS.

You might also like