0% found this document useful (0 votes)
15 views

labOS

operating system lab report

Uploaded by

Babin Bista
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

labOS

operating system lab report

Uploaded by

Babin Bista
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Some basic commands used in linux:

1. Sudo command:

#sudo

sudo is one of the most common Linux commands that lets you
perform tasks that require administrative or root permissions.

2. Pwd command:

#pwd

Use the pwd command to find the path of your current working
directory. Simply entering pwd will return the full current path — a
path of all the directories that starts with a forward slash (/). For
example, /home/username.

3. Cd command:

#cd

Let’s say you’re in /home/username/Documents and want to go


to Photos, a subdirectory of Documents. To do so, enter the
following command:
cd Photos.

4. ls command:

#ls

The ls command lists files and directories within a system.

To see other directories’ content, type ls followed by the desired path.


For example, to view files in the Documents folder, enter:

ls /home/username/Documents

5. cat command:

cat is one of the most frequently used Linux commands. It lists,


combines, and writes file content to the standard output.

#cat filename.txt

6. mkdir command:

Use the mkdir command to create one or multiple directories at once


and set permissions for each of them.

For example, you want to create a directory called sachin.txt:


#mkdir sachin.txt:

7. rmdir command

To permanently delete an empty directory, use the rmdir command

For example, you want to remove an empty subdirectory


named personal1 and its main folder mydir:

#rmdir -p mydir/personal1

8. rm command:

The rm command is used to delete files within a directory.

#rm filename

9. touch command:

The touch command allows you to create an empty file or generate


and modify a timestamp in the Linux command line.

For example, enter the following command to create an HTML file


named Web in the Documents directory:
#touch /home/username/Documents/Web.html

10. chmod command:

chmod is a common command that modifies a file or directory’s read,


write, and execute permissions. In Linux, each file is associated with
three user classes — owner, group member, and others.

#chmod [option] [permission] [file_name]

Some basic command for Windows:

1. dir — Lists the files and directories in the current directory.

Example: dir

2. cd — Changes the current directory.

Example: cd C:\Users\YourUserName\Desktop

3. mkdir — Creates a new directory (folder).

Example: mkdir NewFolder

4 . rmdir — Removes (deletes) a directory.


Example: rmdir OldFolder

5. copy — Copies a file from one location to another.

Example: copy file.txt C:\Users\YourUserName\Desktop

6. move — Moves a file from one location to another or renames a file.


Example: move file.txt

C:\Users\YourUserName\Documents\NewFolder\file_new.txt

7. del — Deletes a file.

Example: del unwanted_file.txt

8. type — Displays the contents of a text file on the command prompt.


Example: type myfile.txt

9. Ping — Sends a network request to a specific host to check


connectivity. Example: ping www.example.com

10. ipconfig — Displays network configuration information, including


IP address, subnet mask, and default gateway.

Example: ipconfig
Process creation and termination
Output:

Thread creation and termination


Output:

CPU scheduling FCFS:

This program accepts the burst times of each process, assumes that processes arrive in order of input, and
calculates the waiting time and turnaround time for each.
Output:
CPU scheduling SJF
Output:

You might also like