Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I have this project Using Linux OS I need help wirh this Lab assignment : which

ID: 3878611 • Letter: I

Question

I have this project Using Linux OS

I need help wirh this Lab assignment :

which Linux command to use for each task?

Display the following information

How long the Course Server has been running since its last boot

The directory in which you are currently

All of the users who are currently logged onto the Course Server
Note: Have a fellow team member log onto the Course Server to see the full output of this command.

The exact name and version of the operating system installed on the Course Server

All of the current processes running on the Course Server

Only the current processes running under your username on the Course Server

Discover the following information about the Course Server’s network connection:

Number of network devices

Name of each network device

IP address (xxx.xxx.xxx.xxx) assigned to each network device (if present)

IPv6 address (xxxx::xxxx:xx:xxxx:xxxx/64) assigned to each network device (if present)

MAC (hardware) address (xx:xx:xx:xx:x:xx) assigned to each network device

Broadcast address (xxx.xxx.xxx.xxx) assigned to each network device (if present)

Subnet Mask (xxx.xxx.xxx.xxx) assigned to each network device (if present)

In your home directory, perform the following steps

Create a folder named lab2

In the lab2 folder

Create an empty file named myPets (do NOT use a text editor)

Store the text Dog: Morris in the myPets file (do NOT open the file)

Display the contents of the myPets file (do NOT open the file)

Using the sed command, change Dog to Cat in the myPets file (do NOT open the file)

Display the contents of the myPets file (do NOT open the file)

For each month of the year, count how many files in the /bin directory have a timestamp for that month
Note 1: Perform the counts for all the months using a single command.
Note 2: The length of a month name in a timestamp is exactly three (3) letters.
Note 3: Linux is case-sensitive (Jan is not equal to jan).
Note 4: The output of the command should match the following format exactly:
              Jan: x
              Feb: x
              Mar: x

Explanation / Answer

1)

How long the course server is being running-

Uptime command is ued to get the server running time.

Command- $uptime –p

2)

The directory in which you are running currently-

Command- $pwd

3)

Users who are currently logged onto the server-

Command- $who

Explanation- who command is used to get the list of users who are currently logged in.

4)

Name and version of the operating system installed

Command- $cat /etc/*-release

5)

List of running processes-

Command- $ps –Au

A is used to list all processes, u for processes of other users

6)

List of current processes running under a username (john)

Command- $ps –u john

This command will list all processes of user john.