0% found this document useful (0 votes)
219 views11 pages

Computer Networking Lab 1 - FAST NUCES

This document provides instructions for a series of tasks in a computer networks lab. It lists common Linux commands like echo, date, hostname, and their functions. It also demonstrates changing directories, viewing directory listings, and accessing manual pages. The tasks involve navigating directories, viewing contents and working directories, and answering questions about the filesystem.

Uploaded by

ahmad irfan
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
Download as docx, pdf, or txt
0% found this document useful (0 votes)
219 views11 pages

Computer Networking Lab 1 - FAST NUCES

This document provides instructions for a series of tasks in a computer networks lab. It lists common Linux commands like echo, date, hostname, and their functions. It also demonstrates changing directories, viewing directory listings, and accessing manual pages. The tasks involve navigating directories, viewing contents and working directories, and answering questions about the filesystem.

Uploaded by

ahmad irfan
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1/ 11

Computer Networks Lab - 2

17F - 8090
Note: due to issues in my personal laptop, I had to borrow laptop from my friend. That’s why
you would see his name at the title bar in screenshots instead of mine. You can compare the
outputs, they are totally free of plagiarism.

Task 1:

- echo hello world prints “hello world”


- Echo * prints everything on the current directory.
- Passwd changes the password of the current user.
- Date: prints the current date.
- Hostname: prints the system name.
- Arch: prints the system architecture.
- Uname -a : prints the system information.
- Uptime: returns information about how long your system has been running.
- Who: return the information about the user, system and time.
- Id: Print user id and group id information.
- Last: gives the recent history and stats of system.

W: provides a quick summary of every user logged into a computer.


Top: shows the summary information of the system and the list of processes or threads
which are currently managed by the linux Kernel.

Man command displays the manual of any command.


Man ls lists the information of attributes to be used with man command.

-clear command clears out the display.


- cal 2000 prints the calendar of year 2000

- cal 9 1975 prints the calendar of respective date.


- echo 5+4 prints the result of the equation
- time sleep 5, makes the computer sleep for 5 mins.
-history: will show you the last five hundred commands you have entered.
- Yes please
Prints “please” in a sequence

Task 2:

- Cd
Stays in the same directory.
- Pwd
Prints current working directory
- ls –al
list the current directory
- cd .
jumps to parent directory.
- pwd
Prints working directory
- cd ..
goes to previous directory.
- Pwd
Prints working directory
- ls –al
list the contents of current directory.
- cd..
goes back to previous directory
- pwd
Prints working directory
- ls –al
lists the contents of current directory
- cd ..
goes to previous directory
- pwd
Prints working directory
- cd /etc
- ls –al | more
lists the contents of directory but with more details
- cat passwd
- cd –
goes back to root directory
- pwd
Prints working directory
Task 3:
Answer 1:

By using command ‘cd’ I jump into different directories and view the list of all available
directories in that specific directory by ‘ls’ command.
Current directory is printed by using ‘pwd’ command and I use ‘cat’ command to look into the
contents of a specific folder.

Answer 2:

Bluetooth and other ports are open, but no devices are connected right now.
Tty device is “ttys000”. Owner of my tty is my current user ‘ahmadirfanx’.
Answer 3:

Yes I can see that it doesn't have actual files, rather it has virtual entries that the
filesystem itself makes up on the spot.

Answer 4:

Answer 5:

Answer 6:

Answer 7:

Answer 8:
Answer 9:

Answer 10:

Answer 9:

Answer 10:

You might also like