os manual
os manual
BACHELOR OF TECHNOLOGY
Operating System
(303105252)
SEMESTER IV
Computer Science & Engineering Department
Faculty of Engineering & Technology
INDEX
SR.NO Page No Date of Marks
Experiment Performance Date of Sign
Title Submission
From To
2303031050355
1
Faculty of Engineering & Technology
Practical – 1
Aim : Study of Basic LINUX Commands
Introduction to LINUX :-
Developed by Linus Torvalds in 1991, the Linux operating system is a powerful
and flexible open-source software platform. It acts as the basis for a variety of
devices, such embedded systems, cell phones, servers, and personal
computers. Linux, that’s well-known for its reliability, safety, and flexibility,
allows users to customize and improve their environment to suit specific
needs. It is similar to Unix, and it is built upon the Linux Kernel. The Linux
Kernel is like the brain of the operating system because it manages how the
computer interacts with its hardware and resources. It makes sure everything
works smoothly and efficiently.
Introduction to Shell :-
A shell is a special user program that provides an interface for the user to use
operating system services. Shell accepts human-readable commands from
users and converts them into something which the kernel can understand. It is
a command language interpreter that executes commands read from input
devices such as keyboards or from files. The shell gets started when the user
logs in or starts the terminal.
Types of Shell :-
Linux offers a variety of shells, each with unique features and capabilities. Some
of the most popular and widely used shells include:
2. sh (Bourne Shell): The original shell that was used on UNIX. It is simple
and fast but lacks many features of more modern shells.
2303031050355
2
Faculty of Engineering & Technology
4. Ksh (Korn Shell): Offers many features, combining elements of both the
Bourne shell and C shell. It provides powerful programming features as
well as interactive use.
5. Csh (C Shell) and Tcsh (TENEX C Shell): Csh offers a syntax that is quite
similar to the C programming language, from which it derives its name.
Tcsh is an improved version of csh that includes command line editing
and completion.
6. Zsh (Z Shell): Combines many of the useful features of Bash, ksh, and
tcsh. It is known for its interactive use enhancements and extensive
customization capabilities.
Introduction to Kernel : -
The kernel is a computer program that is the core of a computer’s operating
system, with complete control over everything in the system. It manages the
following resources of the Linux system – • File management
• Process management
• I/O management
• Memory management
2303031050355
3
Faculty of Engineering & Technology
2. pwd Command :-
The pwd command allows you to print the current working directory on your
terminal. It’s a very basic command and solves its purpose very well.
3. cd Command :-
The cd command is one of the important Linux commands you must know, and
it will help you navigate through directories. Just type cd followed by directory
4. mkdir :-
The mkdir command allows you to create directories from within the terminal.
2303031050355
4
Faculty of Engineering & Technology
5. rm Command :-
The rm command is used to delete files and folders and is one of the important
Linux commands you must know. To delete a directory, you must add the -r
argument to it. Without the -r argument, the rm command won’t delete
directories.
6. touch Command :-
The touch command in Linux creates an empty file or updates the timestamp of
an existing file.
7. clear Command :-
This will clear the terminal screen and move the cursor to the top-left corner of
the screen.
9. tac Command :-
The tac command is the reverse of cat command, as its name specified. It
displays the file content in reverse order (from the last line).
2303031050355
5
Faculty of Engineering & Technology
2303031050355
6
Faculty of Engineering & Technology
14. whereis:-
Whereis in Linux is generally used to see the exact location of any command
typed after this. Let’s see how this performs.
15. ps Command :-
The ps command is used to display information about the current running
processes on the system.
16. mv Command :-
The mv command is generally used for renaming the files
17. ln Command :-
The ln command is used to create a shortcut link to another file.
2303031050355
7
Faculty of Engineering & Technology
22. cp Command :-
The cp command of Linux is equivalent to copy-paste and cut-paste in
Windows.
2303031050355
8
Faculty of Engineering & Technology
23. id Command :-
The id command is used to display the user ID (UID) and group ID (GID).
24. od Command :-
The od command is used to display the content of a file in different s, such as
hexadecimal, octal, and ASCII characters.
Practical 2
2303031050355
9
Faculty of Engineering & Technology
• Vi Text Editor
• Vim Editor
• Nano Editor
• Kate Editor
• Sublime Editor
• Atom Editor
• Emacs Editor
Shell Script
A shell script is a text file containing a sequence of commands for a Unix-based operating system's shell. It allows
users to automate tasks, execute commands, and manage system operations.
Basic Scripts:-
1. write a shell script that shows a basic conversation with the system.
Output:
2303031050355
10
Faculty of Engineering & Technology
Output:
Output:
2303031050355
11
Faculty of Engineering & Technology
Output:
Output:
Practical-3
2303031050355
12
Faculty of Engineering & Technology
Output:
2. Write a shell script to make a table of any number multiple of the input
number upto 10
Output
2303031050355
13
Faculty of Engineering & Technology
2303031050355
14