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

OS Journal

he

Uploaded by

cunociba
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

OS Journal

he

Uploaded by

cunociba
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 57

Practical 1a:

Installation and Configuration of Virtual Machine

Step 1. To download and install the VMware product, visit the official website of VMware.
https://www.vmware.com/in.html

Step 2. Click on Free Product Trials & Demo >> Workstation Pro. You will be redirected to the
download page. (Similarly, you can select any product you want to install.)

Click on Download Now according to your Operating System. We have chosen Workstation 15
Pro for Windows.

1 | Practical 1
While downloading, ensure you have a proper internet connection, as the file may be large.

Step 3: Once the download is complete, run the .exe to install VMware Workstation. A popup will
Appear

Step 4. Once Initialization gets completed, Click on Next.

2 | Practical 1
Step 5. Accept the terms and click Next

Step 6. On the next screen, it will ask for additional features; it is not mandatory to check this box.
Click on Next.

3 | Practical 1
Step 7. On the next screen, some checkboxes are populated; check them as per your requirement.

Click on Next.

4 | Practical 1
Step 8. At this step, VMware Workstation is ready to install. Click on Install.

5 | Practical 1
Step 9. At this step, you can see installation taking place. The installation will take some time; wait for
it to install properly.

Step 10. Once the installation gets completed, you will see the following dialogue box. Click on Finish.
If you have purchased the product and have a license key, click on License to enter the key.

6 | Practical 1
Step 11. Upon Finishing, the window will close, and You can see VMware Workstation installed icon
on your Desktop.

The icon looks like this. Double Click on the icon to open the application.

Step 12. For the first time opening, if you have not entered the License key in step 7, it will ask for a
license key. You can go for the trial version, free for 15 to 30 days. Click on Continue. Make sure
you have Admin rights for this in Windows.

At this stage, you will get the final installation message. Click on Finish.

7 | Practical 1
Finally, this will open a window of VMware Workstation Pro.

8 | Practical 1
Step 13: - Add the key afterwards

Practical 1b:
Installation of Windows OS

Step 1. To download, visit the official download page


https://www.windowstrainer.com

Step 2. Open VMWare Workstation and click on Create a New Virtual Machine or File -> New Virtual
Machine.

Step 3. Select custom and click on next.

9 | Practical 1
Step 4. Select Use Installer disc image and browse to find the downloaded ISO file and click next.

Step 5. On the next page, the configuration wizard will ask you for a Windows XP Product Key, a full
name for user name and password. You can skip the Product key or the password they are
optional, just provide a full name and click Next.

1 | Practical 1
0
Step 6. You will be asked to provide the name and location of the virtual machine and click next. You XP.
Now, click on Finish.

1 | Practical 1
1
Step 9. Open VMware Workstation navigate to Windows XP Virtual Machine, click on Power on this
virtual machine, to begin the installation Process.

1 | Practical 1
2
Step 10. Enter the installation key for Windows XP and wait for the completion.

Step 11. Windows XP is now installed on VMware.

1 | Practical 1
3
Practical 1c
Installation of Linux OS
Step 1. To download the image, visit the official download page
https://developers.redhat.com/

Step 2. Locate the downloaded file in the downloads folder

Step 3. Open VMWare Workstation

1 | Practical 1
4
Step 4. Click on Create a New Virtual Machine or File -> New Virtual Machine.

Step 5. Select custom and click on next.

1 | Practical 1
5
Step 6. Select Use Installer disc image and browse to find the downloaded ISO file and click next.

Step 7. In this dialog box, you will be asked to enter the Full name, User name and password. Enter the
details and click on next.

1 | Practical 1
6
Step 8. In this dialog box, you will be asked to provide the name of the virtual machine. You can provide
any name you like. You can also change the location of the virtual machine.

Step 9. This dialog box asks you to specify the disk capacity. Here 60GB is allocated but you can reduce it
to 20GB also (or you can allocate space according to your need).

1 | Practical 1
7
Step 10. This is the final dialog box and what you see is all the options you have selected in previous
dialog boxes.

Step 11. If you want you can increase the RAM and CPU. To increase the RAM, click on customize
hardware and increase the memory using the slider. Then click Finish.

1 | Practical 1
8
Step 12. After the VM starts, you will see the Red Hat Enterprise Linux 8 boot up. After this the
installation process will start.

Step 13. After the installation completes, VM will restart automatically. Wait for it to restart, you will see
the Red Hat Linux login screen with your user name. Click on the username and enter the
password to login.

Step 14. You will see the Red Hat desktop. That’s it you are done with the installation process.

1 | Practical 1
9
Practical 2:
Windows (DOS) Commands

1. cd (Change Directory)
Changes the current directory to "C:\Users".
Ex. cd C:\Users

2. chkdsk (Check Disk)


Checks the disk integrity of the C: drive.
Ex. chkdsk C:

20 | Practical 2
3. cls (Clear Screen)
Clears the command prompt screen.
Ex. cls

4. copy (Copy Files)


Copies "file.txt" to the "C:\destination" folder.
Ex. copy file.txt C:\destination

21 | Practical 2
5. date (Display or Set Date)
Displays the current date. Use date ‘MM/DD/YYYY’ to set the date.
Ex. date

6. defrag (Defragment Disk)


Defragments the C: drive.
Ex. defrag C:

7. del (Delete Files)


Deletes "file.txt".
Ex. del file.txt

8. diskcomp (Compare Disk Contents)


Compares the contents of disks in drive A: and B:
Ex. diskcomp A: B:

22 | Practical 2
9. diskcopy (Copy Disk)
Copies the contents of disk in drive A: to disk in drive B:.
Ex. diskcopy A: B:

10. diskpart (Disk Partitioning Utility)


Opens the DiskPart utility for managing disks and partitions.
Ex. diskpart

23 | Practical 2
11. doskey (DOS Key Macros)
Creates a DOSKEY macro.
Ex. doskey macro=command

12. echo (Display Text)


Displays "Hello, World!" in the console.
Ex. echo Hello, World!

24 | Practical 2
(

13. edit Text Editor)*


Opens the "file.txt" in the MS-DOS Editor.
*not available in modern Windows versions
Ex. edit file.txt

14. fc (File Compare)


Compares the contents of "file1.txt" and "file2.txt".
Ex. fc file1.txt file2.txt

15. find (Search Text)


Searches for "keyword" in "file.txt".
Ex. find "keyword" file.txt

16. format (Format Disk)


Formats the C: drive.
Ex. format C:

25 | Practical 2
(

17. md (Make Directory)

Ex. md NewFolder

Creates a new directory


named "NewFolder".
18 . move Move Files)
Moves "file.txt" to the "C: \destination" folder.
Ex. move file.txt C:\destination

19. path (Display or Set Command Search Path)


Displays the current command search path.
Ex. path

20. rd (Remove Directory)


Removes the directory named "OldFolder".
Ex. rd OldFolder

21. rename (Rename Files or Directories)


Renames "old.txt" to "new.txt".
Ex. rename old.txt new.txt

22. set (Set Environment Variables)


Sets the environment variable VAR_NAME to "value".
Ex. set VAR_NAME=value

26 | Practical 2
(

23. time (Display or Set Time)


Displays the current time. Use ‘time HH:mm:ss’ to set the time.
Ex. time

24. type Display File Contents)


Displays the contents of "file.txt".
Ex. type file.txt

25. ver (Display Windows Version)


Displays the current version of Windows.
Ex. ver

26. xcopy (Extended Copy)


Copies the contents of the "source" directory to the "destination" directory including
subdirectories.
Ex. xcopy source\* destination\ /E

27 | Practical 2
Practical 3:
Linux Commands

1. pwd (Print Working Directory)


Description: Displays the current directory path.
Ex. Pwd

2. cd (Change Directory)
Description: Used to navigate between directories.
Ex. cd /home/user/documents (Absolute path)
cd ../images (Relative path)

3. ls (List)
Description: Lists the files and directories in the current directory.
Ex. Ls or ls -l

4. mkdir (Make Directory)


Description: Creates a new directory.
Ex. mkdir new_directory

5. rmdir (Remove Directory)


Description: Deletes an empty directory.
Ex. rmdir empty_directory

6. file
Description: Determines the file type.
Ex. file document.txt

7. touch
Description: Creates an empty file or updates file timestamps.
28 | Practical 3
Ex. touch new_file.txt

8. rm (Remove)
Description: Deletes files or directories.
Ex. rm file.txt

9. cp (Copy)
Description: Copies files or directories.
Ex. cp source.txt destination_folder/

t1.txt t2.txt

10. mv (Move/Rename)
Description: Moves files/directories or renames them.
Ex. i) mv old_file.txt new_location/

29 | Practical 3
ii) mv original_name.txt new_name.txt

11. rename
Description: Renames multiple files using patterns.
Ex. rename 's/old/new/' *.txt

12. head
Description: Displays the beginning lines of a file.
Ex. head -n 10 file.txt

13. tail
Description: Displays the ending lines of a file.
Ex.
tail -n
20

file.txt

14. cat (Concatenate)


Description: Displays the contents of a file.
Ex. cat file.txt

30 | Practical 3
15. tac
Description: Displays the contents of a file in reverse.
Ex. tac file.txt

16. more
Description: Displays text files one screen at a time.
Ex. more file.txt

17. less
Description: Displays text files with backward navigation support.
Ex. less file.txt

31 | Practical 3
18. strings
Description: Finds printable strings in binary files.
Ex. strings binary_file

19. chmod (Change Mode)


Description: Changes file permissions.
Ex. chmod +x script.sh

20. ps (Process Status)


Description: Lists running processes.
Ex. ps aux

32 | Practical 3
21. pgrep
Description: It gives PROCESS ID of an application
Ex. pgrep firefox

22. top
Description: Provides real-time system monitoring.

Ex. Top

23. kill
Description: Sends a signal to terminate a process.
Ex. kill PID

24. pkill
Description: Terminates processes based on their names.
Ex. pkill process_name

25. bg (Background)
Description: Puts a process in the background.

33 | Practical 3
Ex. Bg

26. fg (Foreground)
Description: Brings a background process to the foreground.
Ex. fg

27. grep
Description: Searches for patterns in files or output.
Ex. grep "pattern" file.txt

28. locate
Description: Searches for files and directories using a pre-built index.
Ex. locate file.txt

29. find
Description: Searches for files and directories in a directory hierarchy.
Ex. find . -name "*file.txt"

30. date
Description: Displays or sets the system date and time.
Ex. date

34 | Practical 3
31. cal (Calendar)
Description: Displays a calendar for a specified month or year.
Ex. cal
Variations: i) cal 2023 (displays the whole years calendar)
ii) cal 6 2023 (displays the June month of the year)
iii) cal -3 10 2023 (displays the last 3 months of the year)

i)

ii)

iii)

32. uptime
Description: Displays system uptime and load averages.
Ex. Uptime

33. w
Description: Displays information about currently logged-in users.
Ex. w

34. whoami
Description: Displays the current user's username.
Ex. whoami

35 | Practical 3
35. finger
Description: Displays user information.
Ex. finger username

36. uname (Unix Name)


Description: Displays system information.
Ex. uname -a

37. man (Manual)


Description: Displays the manual pages for commands.
Ex. man ls

38. df (Disk Free)


Description: Displays disk space usage.
Ex. df -h

36 | Practical 3
39. du (Disk Usage)
Description: Displays the sizes of directories and files.
Ex. du -sh directory

40. free
Description: Displays system memory usage.
Ex. free -h

41. whereis
Description: Locates the binary, source, and manual page files fora command.
Ex. whereis ls

42. which
Description: Shows the full path of a command.
Ex. which -a <program_name>

43. tar

37 | Practical 3
Description: Creates or extracts compressed archive files.
Ex. tar -czvf file.tar folder name

44. gzip
Description: Compresses or decompresses files using the gzip algorithm.

Ex. i) gzip file.txt (Compresses the file)


ii) gzip -d file.txt.gz (Decompresses the file)

38 | Practical 3
Practical 4:
Working with Linux Desktop and utilities

a. The vi Editor

To open a file in vi:


Type vi followed by the name of the file.
For example, to open the file myfile.txt, you would type vi myfile.txt
When you first open a file in vi, you will be in command mode.

To enter insert mode:


Press i
In insert mode, you can type text into the file.

To exit insert mode:


Press Esc.

To save your changes:


Press Esc to enter command mode.
Type :w to save your changes.
Type :wq to save your changes and quit vi.

Useful vi commands: dd - Delete the current


line. yy -Copy the current line. p - Paste the
copied line below the current line. x - Delete
the current character.
u - Undo the last change.
/ - Search for a string in the file.
? - Search backwards for a string in the file

39 | Practical 4
b. Graphic User Interface (GUI)

Most Linux distributions come with a graphical user interface (GUI) by default. The GUI provides a
userfriendly interface for interacting with the operating system. Common GUI elements include
windows, icons, menus, and toolbars.

To use the GUI, simply click on the icons and menus to launch applications and perform tasks. You can
also use the keyboard to navigate the GUI and perform commands.

c. Working with Terminal

To open a terminal emulator:


Press `Ctrl` + `Alt` + `T` or search for "Terminal" in the applications menu.

Once you are in a terminal window, you can use:


• cd command to change directories
• ls command to list the contents of the current directory
• pwd command to print the working directory

40 | Practical 4
d. Adjusting Display Resolution

To adjust the display resolution in Linux:


1. Open the Settings application.
2. Click on the Display icon.
3. Under Resolution, select the desired resolution from the drop-down menu.
4. Click on Apply.

e. Using the Browser

To open a web browser (e.g., Firefox):


Type firefox in the terminal and press `Enter`.

f. Configuring Simple Networking

To view your network configuration:


1. ifconfig or ip addr
2. Open the Settings application.
3. Click on the Network icon.
4. Under Ethernet, click on the gear icon.
5. Under IPv4, select the Automatic (DHCP) option.
6. Click on Apply.

41 | Practical 4
g. Creating Users and Shares

To create a new user in Linux:


1. Open the Settings application.
2. Click on the Users icon.
3. Click on the + button.
4. Enter a username and password for the new user.
5. Click on Add.

To create a share in Linux:

1. Open the Settings application.


2. Click on the Files icon.
3. Click on the + button.
4. Select the Share type you want to create.
5. Enter a name for the share.
6. Select the folders and files you want to share.
7. Click on Share.

Once you have created a share, you can access it from other devices on your network by typing the
following address into a web browser:

http://<server_ip_address>/<share_name>

42 | Practical 4
43 | Practical 4
Practical 5:
Installing utility software on Linux and Windows.

Linux:
• Install the GIMP image editor:
o Open a terminal window. o Type the following command: sudo apt install gimp o Press
Enter and type your password when prompted.
• Install the VLC media player:
o Open a terminal window. o Type the following command: sudo apt install vlc o Press
Enter and type your password when prompted.
• Install the 7-Zip file archiver:
o Open a terminal window.
o Type the following command: sudo apt install p7zip-full o Press Enter and type your
password when prompted.
• Install the Htop system monitor:
o Open a terminal window. o Type the following command: sudo apt install htop o Press
Enter and type your password when prompted.

44 | Practical
5
Windows:
• Install the 7-Zip file archiver:
o Download the 7-Zip installer from the official website: https://www.7-zip.org/ o
Double-click the installer file to start the installation process.
o Follow the on-screen instructions to complete the installation.
• Install the VLC media player:
o Download the VLC installer from the official website:
https://www.videolan.org/vlc/index.html
o Double-click the installer file to start the installation process.
o Follow the on-screen instructions to complete the installation.
• Install the Notepad++ text editor:
o Download the Notepad++ installer from the official website: https://notepad-plusplus.org/
o Double-click the installer file to start the installation process.
o Follow the on-screen instructions to complete the installation.
• Install the Ninite utility installer:
o Visit the Ninite website: https://ninite.com/ o Select the utilities you want to install and
click the "Get Installer" button.
o Run the Ninite installer and follow the on-screen instructions to install the selected utilities

45 | Practical 6
5
Practical 6:
Running C/C++/Python programs in Linux

C++ Programs:

odd_even.cpp

#include <iostream> int main()


{ int
num;
std::cout << "Enter an integer:";
std::cin >> num; if (num % 2 ==
0)
{
std::cout << num << " is even." << std::endl;
} else
{
std::cout << num << " is odd." << std::endl;
} return
0;
}

To compile and run the C++ program:

1. Write this in text editor.


2. Save the above code into a file named ‘odd_even.cpp’.
3. Open a terminal.
4. Navigate to the directory where `odd_even.cpp` is saved.
5. Compile the code using the following command:
g++ -o odd_even odd_even.cpp

6. Run the compiled program:


./odd_even

46 | Practical
fact.cpp

#include <iostream>
int main()
{
int i, fact = 1, number;
std::cout << "Enter any number: ";
std::cin >> number;
for (i = 1; i <= number; i++)
{
fact = fact * i;
}
std::cout << "Factorial of " << number << " is: " << fact << std::endl;
return 0;
}

To compile and run the C++ program:

1. Write this in text editor.


2. Save the above code into a file named ‘fact.cpp’.
3. Open a terminal.
4. Navigate to the directory where ‘fact.cpp’ is saved.
5. Compile the code using the following command:
g++ -o fact fact.cpp

6. Run the compiled program:


./fact

47 | Practical 6
Python Programs:

odd_even.py

num = int(input("Enter an integer: "))


if num % 2 == 0:
print (num, "is even.")
else:
print(num, "is odd.")

To run the Python program:

1. Write this in text editor.


2. Save the above code into a file named ‘odd_even.py’.
3. Open a terminal.
4. Navigate to the directory where ‘odd_even.py’ is saved.
5. Run the Python program using the following command:
python3 odd_even.py

fact.py

def factorial(n):
if n == 0:
return 1 else:
return *factorial(n-1)
n = int(input("Enter negative non-zero number : ")) print(("Factorial
of ",n, "is ", fact(n))

To run the Python program:

1. Write this in text editor.


2. Save the above code into a file named ‘fact.py’.
3. Open a terminal.
4. Navigate to the directory where ‘fact.py’ is saved.
5. Run the Python program using the following command:
python3 fact.py

48 | Practical
These steps should allow you to compile and run the C++ and Python programs for the odd-even check on
a Linux system.

Practical 7:
Introduction to Linux Shell Scripting

a. Basic Operators
b. Decision Making
c. Looping
d. Regular Expression
e. Special Variables and Command Line Arguments

Prerequisite

Install nano:
sudo apt-get install nano

a. Basic Operators

Operators in shell scripting are used for tasks such as arithmetic operations and string manipulation.

Ex. a=10 b=20


echo "Sum: $(($a + $b))"

Explanation: This script calculates and prints the sum of two variables, `a` and `b`.

49 | Practical 6
7

50 | Practical
b. Decision Making (if statement)

Conditional statements allow you to execute different code blocks based on certain conditions.

Ex. echo “Please enter a number:” read


number
if [“$number” -gt 10]; then
echo “The number is greater than 10.”
elif [“$number” -eq 10]; then
echo “The number is equal to 10.”
else
echo “The number is less than 10.” Fi
Explanation: This script checks if the value of the variable `num` is greater than 10 and prints a message
accordingly.

c. Looping (for loop)

Loops help in executing a block of code repeatedly.

Ex. for i in {1..5}; do


echo “Itteration: $i”
done

Explanation: This script uses a `for` loop to print the value of the variable `i` for each iteration.

51 | Practical
d. Regular Expression

Regular expressions are used for pattern matching and manipulation of strings.

Ex. string="Hello, World!" if [[ $string =~


^[A-Za-z]+ ]]; then echo "String starts
with a letter."
Fi
Explanation: This script checks if the string starts with one or more letters using a regular expression.

52 | Practical
7
e. Special Variables and Command Line Arguments

Special variables provide information about the script and its environment, and command line
arguments are the values passed to the script when it's run.

Ex. echo “Script Name: $0” echo


“Number of Arguments: $#”
echo “Arguments: $@”
Explanation: This script prints the name of the script, the number of arguments, and all the arguments
passed to the script.

53 | Practical
Practical 8:

Case study of Server OS:


Windows Server 2022 operating System - Architecture, Components, Services,
Configuration

Overview

A case study of Windows Server 2022 is like a story about how a special computer system
called Windows Server 2022 helped a company or organization. It’s like a superhero computer
that makes everything work better and safer. In this story, we learn about why the company
needed Windows Server 2022, how they set it up, and the good things that happened because of
it. It’s like a before-and-after picture where things get better and more organized. The case study
shows us how Windows Server 2022 makes the computer stuff easier, like keeping track of all
the people who use it, running lots of different programs at the same time, and keeping
everything safe from bad guys on the internet. It’s like a real-life example that helps other
companies understand how Windows Server 2022 could be like a helpful friend for their
computer systems too.

54 | Practical
Practical 9:

Case study of Android OS:

Overview

The Android operating system, developed by Google, has become a


dominant force in the global smartphone market. This case study
delves into the evolution, challenges, and impact of the Android OS
since its inception. Android OS was officially launched in 2008.It
quickly gained market share due to its open-source nature and the
wide variety of devices it supported. Android is built on the Linux
kernel and is an open-source platform. This means that its source code
is freely available for developers to modify and customize, which has
contributed to its widespread adoption. Android app development is typically done using the
Java or Kotlin programming languages. Google provides Android Studio, an integrated
development environment (IDE), to assist developers in creating Android apps.

Android continues to evolve, with a focus on advancements in AI integration, 5G connectivity,


foldable device support, and enhanced user privacy features. Android OS has played a significant
role in shaping the modern smartphone landscape, offering diversity, flexibility, and a robust app
ecosystem to users and developers alike.

Open Source Inter App Integration

Larger Developer and Reduced Development


Community Reach Cost

Rich Development
Increased Marketing Higher Success Ratio
Environment

55 | Practical
Practical 10:

Case study of Cloud OS:


AWS, Azure, Google Cloud

1. AWS
Amazon Web Services (AWS), the cloud computing arm of
Amazon.com, has become a dominant player in the global cloud
services market. This case study explores the journey,
strategies, and impact of AWS in transforming the way
businesses leverage cloud technology.

AWS was officially launched in 2006, offering a suite of cloud


services including computing power, storage, databases,
machine learning, and more. It quickly gained market share due to its scalability, reliability, and
extensive global network of data centers. Amazon Web Services has revolutionized the way
businesses operate in the digital age.

This case study offers insights into how AWS has empowered organizations to innovate, scale,
and thrive in a rapidly changing technological landscape, making it a pivotal force in the cloud
computing industry.

2. Azure
Microsoft Azure, commonly referred to as Azure, is a leading cloud
computing platform and infrastructure developed by Microsoft. This case
study explores the evolution, strategies, and impact of Azure in
facilitating digital transformation for businesses and organizations.

Azure was officially launched in 2010 as Windows Azure and was later
rebranded as Microsoft Azure. It offers a comprehensive suite of cloud
services, including computing, storage, databases, AI, and IoT solutions.

Predictions on the future of cloud computing and Azure's role in shaping it. Discussion of
emerging trends such as edge computing, hybrid cloud solutions, and quantum computing.
Microsoft Azure has emerged as a key player in the cloud computing industry, empowering
organizations to innovate, scale, and succeed in the digital era. This case study provides insights
into Azure's impact on digital transformation and showcases its role as a catalyst for
technological advancement and business growth.
3. Google Cloud

Google Cloud is a cloud computing platform developed by


Google. This case study explores the growth, strategies, and
impact of Google Cloud in revolutionizing cloud services and
fostering innovation for businesses and organizations.

Google Cloud, initially known as Google App Engine, was


officially launched in 2008 as part of Google's suite of cloud
offerings. It provides a wide range of cloud services, including computing, storage, databases,
machine learning, and data analytics.

Predictions on the future of cloud computing and Google Cloud’s role in shaping the industry.
Discussion of emerging trends such as serverless computing, edge computing, and multi-cloud
strategies. Google Cloud has emerged as a prominent player in the cloud computing landscape,
facilitating innovation, scalability, and digital transformation for organizations. This case study
provides insights into Google Cloud’s impact on technology advancement and its role as a catalyst
for business growth in the cloud era.

You might also like