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

Operating Systems

The document compares various operating systems including Windows, macOS, Linux, Android, and iOS, highlighting their definitions, examples, and key comparisons. It also details basic UNIX/Linux commands for file management, navigation, and process control, providing syntax and usage for each command. Additionally, it covers concepts related to inode, I/O redirection, piping, and email commands in Unix/Linux systems.

Uploaded by

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

Operating Systems

The document compares various operating systems including Windows, macOS, Linux, Android, and iOS, highlighting their definitions, examples, and key comparisons. It also details basic UNIX/Linux commands for file management, navigation, and process control, providing syntax and usage for each command. Additionally, it covers concepts related to inode, I/O redirection, piping, and email commands in Unix/Linux systems.

Uploaded by

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

PRACTICAL- 1

AIM: Compare different types of operating systems and make a chart.

OPERATING SYSTEMS

Windows Definition: Windows is a proprietary operating system developed by Microsoft,


widely used for personal computers, business systems, and gaming platforms.
It is known for its graphical user interface and broad compatibility with
software and hardware.
Examples: Windows 10, Windows 11.
Comparison: Windows offers a user-friendly experience and supports a wide
range of applications. However, it requires regular updates to maintain
security, as it is more vulnerable to malware attacks. It is a paid operating
system, which may not suit budget-conscious users.
macOS Definition: macOS is a UNIX-based operating system developed by Apple,
designed exclusively for its Mac computers. It focuses on performance, design,
and seamless integration with Apple devices.
Examples: macOS Ventura, macOS Sonoma.
Comparison: macOS provides a sleek and polished interface, making it ideal for
creative professionals. It offers strong security and stability but is limited to
Apple hardware, which is generally more expensive. Its closed ecosystem can
also restrict customization options.
Linux Definition: Linux is an open-source, UNIX-like operating system available in
various distributions (distros) that cater to different needs, from beginners to
advanced users.
Examples: Ubuntu, Fedora, Debian.
Comparison: Linux is highly customizable and free to use, making it popular
among developers and tech enthusiasts. It is more secure due to its open-
source nature but has a steeper learning curve. Compatibility with certain
software and games can be limited compared to Windows.
Android Definition: Android is an open-source operating system developed by Google,
primarily used in mobile devices, tablets, and smart TVs.
Examples: Android 13, Android 14.
Comparison: Android is flexible and supports millions of applications through
the Google Play Store. It is widely customizable, but its open-source nature
can lead to fragmentation and inconsistent updates across devices, which may
pose security challenges.
iOS Definition: iOS is a proprietary operating system developed by Apple, designed
exclusively for its iPhone and iPad devices. It focuses on performance, privacy,
and simplicity.
iOS Examples: iOS 16, iOS 17.
Comparison: iOS is highly secure and optimized for Apple hardware, offering
smooth performance and regular updates. However, it is a closed system with
limited customization and higher costs due to Apple’s premium devices.

Akanshi
PRACTICAL- 2
Aim: Use of basic UNIX Shell Commands/Linux Commands.

Software Used: Command Prompt.

Commands:

 mkdir – Creates a New Directory (Folder):


The mkdir command is used to create a new directory in the current location or at a
specified path. This is helpful when organizing files into folders. For example, if there’s a
project, separate directories for documents, scripts, or data can be created. Multiple
directories can also be created in one go by listing their names.
Syntax: mkdir folder_name.

 cd – Changes the Current Directory:


The cd command is used to navigate between directories in the system. It allows movement
into specific folders, making it easier to manage files. Using cd .. moves to the parent
directory. For accessing directories with absolute paths, starting with / ensures direct
navigation from the root.
Syntax: cd folder_name.

 echo – Displays Text or Variables:


The echo command is used to display text or the value of variables in the terminal. It’s
helpful for printing messages, debugging scripts, or creating files with specific content. It can
also be used to print system variables like the current user or hostname. Output can be
redirected to create or append content to a file.
Syntax: echo "text here".

 ls – Lists Files and Directories:


The ls command is used to list files and directories in the current location. It helps us quickly
see what’s available in a folder. It also supports options like -l for a detailed view, showing file
permissions, sizes, and modification dates, and -a to list hidden files (those that start with a
dot).
Syntax: ls

 cat – Displays File Content:


The cat command is used to display the content of a file directly in the terminal. It is
commonly used to quickly view text files or merge files. If multiple files are specified, cat will
display them one after the other.
Syntax: cat file_name

 pwd – Prints the Current Directory Path: Akanshi


The pwd command stands for print working directory. It shows the absolute path of the
current directory, helping us confirm where we are in the file system. This is especially useful
when working with deep folder structures.
Syntax: pwd
 cp – Copies Files or Directories:
The cp command is used to copy files or directories from one location to another. It helps in
duplicating files for backup or creating separate copies for editing. To copy directories and
their contents, the -r option is used for recursion.
Syntax: cp source_file destination_file

 rm – Deletes Files or Directories:


The rm command is used to delete files or directories. Unlike a trash bin, it permanently
removes the specified files or folders, so caution is required. To delete directories, the -r flag
is used to remove everything inside the directory recursively.
Syntax: rm file_name

 head – Displays the First Few Lines of a File:


The head command is used to view the first few lines of a file. By default, it shows the first
10 lines, but this can be adjusted with the -n option. It’s useful for quickly previewing files,
especially large logs or documents, without opening the entire file.
Syntax: head file_name

 df -h – Displays Disk Space Usage in Human-Readable Format:


The df command shows information about disk space usage for file systems. With the -h flag,
it presents the data in a human-readable format, using units like MB or GB instead of bytes.
This is useful when we need to check available disk space on different devices or partitions.
Syntax: df -h

 diff – Compares Two Files Line by Line:


The diff command is used to compare two files and highlight the differences between them.
It is especially helpful when tracking changes between two versions of a file, such as in
coding or text documents. It outputs the lines that differ, which makes it easier to identify
what has been added, removed, or changed.
Syntax: diff file1 file2

 less – Views a File One Screen at a Time:


The less command allows us to view large files one screen at a time in the terminal. It is Akanshi
particularly useful when dealing with files that are too large to fit on a single screen, like log
files or reports. Unlike cat, which displays the entire content all at once, less provides a
paginated view, allowing us to scroll through the content. We can use arrow keys or search
within the file.
Syntax: less file_nam

Practical:
PRACTICAL- 3
Aim: Commands related to inode, I/O redirection and piping, process control commands, mails.
Commands:

1. Inode: Commands like stat and ls -i help explore inode information (unique identifiers for
files).

o stat – Displays detailed information about a file, including its inode number.
Syntax: stat file_name
o ls -i – Lists files with their inode numbers.
Syntax: ls -i

2. I/O Redirection: Commands like echo, >, and >> demonstrate how data can be redirected to
files for both input and output

o echo – Prints a message or the value of a variable to the terminal, or redirects the output to
a file.
Syntax: echo "message"
o > – Redirects output to a file, overwriting the file's current content.
Syntax: command > file_name
o >> – Appends output to the end of a file without overwriting it.
Syntax: command >> file_name

3. Piping: The cat | grep and ls | grep commands demonstrate how data can be passed
between commands using a pipe (|).

o | (Pipe) – Passes the output of one command as input to another command.


Syntax: command1 | command2
o grep – Searches for a pattern within a file or input.
Syntax: grep "pattern" file_name

4. Process Control: Commands like sleep, jobs, and kill showcase how background processes
are managed and terminated.

o sleep – Pauses execution for a specified number of seconds.


Syntax: sleep time_in_seconds
o jobs – Lists all background jobs currently running in the terminal.
Syntax: jobs
o kill – Terminates a process by its job number or process ID.
Syntax: kill %job_number or kill process_id
5. Mails:

Concepts related to sending and receiving emails on Unix/Linux systems typically involve
commands like mail or sendmail. These commands allow users to send messages or outputs
as emails directly from the terminal.
PRACTICAL:

Input:

Output:

You might also like