You are on page 1of 3

Practical Exercise

for
Computer Networks
Talal Ahmed 19F-0245 CS-5A

Question 1:

1: Echo Hello world prints hello world on the bash terminal.


Whereas echo * displays all the files folders on the terminal

2: Passwd is used to change password for the account of the user.


3: Hostname is used to display computer’s hostname on the screen
4: It displays the architecture of the computer
5: Uname -a displays all information about kernel name, release version, version date, network,
operating system
6: Uptime is used to display from how much time the system is active.
7: Who is used to display the user who is logged in on the system. W also shows who is logged
in and what the user is doing
8: Last is used to display all the information of the user regarding log in and log out on the
system.
9: Echo $SHELL displays the current shell in which the user Is working.
10: Man ls displays the manual in which information is written about commands which user
can run.
11: Shows the manual which has all the command which user can run.
12: clears the terminal.
13: bc is a command line basic calculator. It is used to do arithmetic calculations. echo 5+4 |
bc -l will result in 9.
14: It outputs an affirmative response, or a user defined string or text, continuously until killed.
15: History command is used to used to view the previously executed command.
Question 2:

Question 3:

1: ls -l shows the files in directory along with permissions while ls -L only shows
the file name in the directory.
2: echo * will display all the files in the directory.
3: $SHELL is binary file which is mapped under your Linux environment. You cannot create or
delete any file with name $SHELL
4: to create: touch \#filename. To remove: rm \#filename.
5: touch -- <filename> rm -- <filename>
Question 4:

1:

2:

You might also like