0% found this document useful (0 votes)
28 views6 pages

Unix/Linux Operating System Overview

The document provides an introduction to Unix/Linux operating systems. It discusses that Unix is a multi-user and multi-tasking operating system. The key components of Unix include the kernel, shell, commands/utilities, and file organization into a hierarchical file system with directories. It also describes how to log in and out, change passwords, check who is logged in, list files and directories, and properly shut down a Unix system.

Uploaded by

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

Unix/Linux Operating System Overview

The document provides an introduction to Unix/Linux operating systems. It discusses that Unix is a multi-user and multi-tasking operating system. The key components of Unix include the kernel, shell, commands/utilities, and file organization into a hierarchical file system with directories. It also describes how to log in and out, change passwords, check who is logged in, list files and directories, and properly shut down a Unix system.

Uploaded by

Amit Saha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

REAL TIME OPERATION SYSTEM

UNIT – I
INTRODUCTION TO UNIX/LINUX

What is Unix ?

The Unix operating system is a set of programs that act as a link between the computer and the
user.

The computer programs that allocate the system resources and coordinate all the details of the
computer's internals is called the operating system or the kernel.

Users communicate with the kernel through a program known as the shell. The shell is a
command line interpreter; it translates commands entered by the user and converts them into a
language that is understood by the kernel.

 Unix was originally developed in 1969 by a group of AT&T employees Ken Thompson,
Dennis Ritchie, Douglas McIlroy, and Joe Ossanna at Bell Labs.
 There are various Unix variants available in the market. Solaris Unix, AIX, HP Unix and
BSD are a few examples. Linux is also a flavor of Unix which is freely available.
 Several people can use a Unix computer at the same time; hence Unix is called a
multiuser system.
 A user can also run multiple programs at the same time; hence Unix is a multitasking
environment.
Unix Architecture

Here is a basic block diagram of a Unix system −

The main concept that unites all the versions of Unix is the following four basics −

 Kernel − The kernel is the heart of the operating system. It interacts with the hardware
and most of the tasks like memory management, task scheduling and file management.
 Shell − The shell is the utility that processes your requests. When you type in a command
at your terminal, the shell interprets the command and calls the program that you want.
The shell uses standard syntax for all commands. C Shell, Bourne Shell and Korn Shell
are the most famous shells which are available with most of the Unix variants.
 Commands and Utilities − There are various commands and utilities which you can
make use of in your day to day activities. cp, mv, cat and grep, etc. are few examples of
commands and utilities. There are over 250 standard commands plus numerous others
provided through 3rd party software. All the commands come along with various options.
 Files and Directories − All the data of Unix is organized into files. All files are then
organized into directories. These directories are further organized into a tree-like
structure called the filesystem.
System Bootup

If you have a computer which has the Unix operating system installed in it, then you simply need
to turn on the system to make it live.

As soon as you turn on the system, it starts booting up and finally it prompts you to log into the
system, which is an activity to log into the system and use it for your day-to-day activities.

Login Unix

When you first connect to a Unix system, you usually see a prompt such as the following −

login:

To log in

 Have your userid (user identification) and password ready. Contact your system
administrator if you don't have these yet.
 Type your userid at the login prompt, then press ENTER. Your userid is case-sensitive,
so be sure you type it exactly as your system administrator has instructed.
 Type your password at the password prompt, then press ENTER. Your password is also
case-sensitive.
 If you provide the correct userid and password, then you will be allowed to enter into the
system. Read the information and messages that comes up on the screen, which is as
follows.

login : amrood
amrood's password:
Last login: Sun Jun 14 [Link] 2009 from [Link]
$

You will be provided with a command prompt (sometime called the $ prompt ) where you type
all your commands. For example, to check calendar, you need to type the cal command as
follows −

$ cal
June 2009
Su Mo Tu We Th Fr Sa
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
$
Change Password

All Unix systems require passwords to help ensure that your files and data remain your own and
that the system itself is secure from hackers and crackers. Following are the steps to change your
password −

Step 1 − To start, type password at the command prompt as shown below.

Step 2 − Enter your old password, the one you're currently using.

Step 3 − Type in your new password. Always keep your password complex enough so that
nobody can guess it. But make sure, you remember it.

Step 4 − You must verify the password by typing it again.

$ passwd
Changing password for amrood
(current) Unix password:******
New UNIX password:*******
Retype new UNIX password:*******
passwd: all authentication tokens updated successfully

Note − We have added asterisk (*) here just to show the location where you need to enter the
current and new passwords otherwise at your system. It does not show you any character when
you type.

Listing Directories and Files

All data in Unix is organized into files. All files are organized into directories. These directories
are organized into a tree-like structure called the filesystem.

You can use the ls command to list out all the files or directories available in a directory.
Following is the example of using ls command with -l option.

$ ls -l
total 19621
drwxrwxr-x 2 amrood amrood 4096 Dec 25 09:59 uml
-rw-rw-r-- 1 amrood amrood 5341 Dec 25 08:38 [Link]
drwxr-xr-x 2 amrood amrood 4096 Feb 15 2006 univ
drwxr-xr-x 2 root root 4096 Dec 9 2007 urlspedia
-rw-r--r-- 1 root root 276480 Dec 9 2007 [Link]
drwxr-xr-x 8 root root 4096 Nov 25 2007 usr
-rwxr-xr-x 1 root root 3192 Nov 25 2007 [Link]
-rw-rw-r-- 1 amrood amrood 20480 Nov 25 2007 [Link]
-rw-rw-r-- 1 amrood amrood 5654 Aug 9 2007 [Link]
-rw-rw-r-- 1 amrood amrood 166255 Aug 9 2007 [Link]

Here entries starting with d..... represent directories. For example, uml, univ and urlspedia are
directories and rest of the entries are files.

Who Are You?

While you're logged into the system, you might be willing to know : Who am I?

The easiest way to find out "who you are" is to enter the whoami command −

$ whoami
amrood

Try it on your system. This command lists the account name associated with the current login.
You can try who am i command as well to get information about yourself.

Who is Logged in?

Sometime you might be interested to know who is logged in to the computer at the same time.

There are three commands available to get you this information, based on how much you wish to
know about the other users: users, who, and w.

$ users
amrood bablu qadir

$ who
amrood ttyp0 Oct 8 14:10 (limbo)
bablu ttyp2 Oct 4 09:08 (calliope)
qadir ttyp4 Oct 8 12:09 (dent)

Try the w command on your system to check the output. This lists down information associated
with the users logged in the system.
Logging Out

When you finish your session, you need to log out of the system. This is to ensure that nobody
else accesses your files.

To log out

 Just type the logout command at the command prompt, and the system will clean up
everything and break the connection.

System Shutdown

The most consistent way to shut down a Unix system properly via the command line is to use
one of the following commands −

[Link]. Command & Description

halt
1
Brings the system down immediately
init 0
2
Powers off the system using predefined scripts to synchronize and clean up the system
prior to shutting down
init 6
3
Reboots the system by shutting it down completely and then restarting it
poweroff
4
Shuts down the system by powering off
reboot
5
Reboots the system
shutdown
6
Shuts down the system

You typically need to be the super user or root (the most privileged account on a Unix system) to
shut down the system. However, on some standalone or personally-owned Unix boxes, an
administrative user and sometimes regular users can do so.

Common questions

Powered by AI

Unix's design principles, such as simplicity, modularity, and reusability, have profoundly influenced modern operating systems. The modular nature of Unix, where the operating system is divided into various components like kernel, shell, and utilities, allows for flexibility and ease of modification. Its use of a single file interface simplifies device and file interaction. These principles have encouraged the development of open-source systems, notably Linux, which has adopted and expanded upon Unix's underlying concepts. Unix's focus on providing a robust, multiuser, multitasking environment has set a standard for contemporary operating systems, emphasizing user access management and efficient resource handling .

To manage user sessions, Unix provides the 'logout' command, which ends a user's session by cleaning up and disconnecting the user from the system, ensuring security and preventing unauthorized access to files. System shutdowns are managed using several commands. The 'halt' command brings the system down immediately, while 'init 0' powers off the system using scripts to synchronize and clean it up before shutting down. 'Init 6' reboots the system by shutting it down completely first, 'poweroff' powers off the system, 'reboot' reboots the system directly, and 'shutdown' performs an orderly system shutdown. Typically, superuser or root privileges are required to execute these commands to prevent unauthorized shutdown operations .

Unix shell types, including the C Shell, Bourne Shell, and Korn Shell, serve as command line interpreters that process and execute user commands by interacting with the kernel. They differ mainly in syntax, scripting capabilities, and features. The Bourne Shell (sh) is known for its simplicity and efficiency in scripting. The C Shell (csh) provides C-like syntax and added features, like history substitution and job control, aimed at enhancing interactive use. The Korn Shell (ksh) offers advanced scripting features, combining elements from both the Bourne and C Shells, and is renowned for its speed and robustness. Each shell interprets commands and scripts, facilitating user interaction with Unix by translating high-level instructions into kernel-understandable language .

The multiuser capability of Unix systems allows several users to access and use the computer simultaneously. This is significant because it facilitates resource sharing and efficient utilization of the system in environments where multiple users need to perform operations concurrently. The multitasking ability enables a user to run multiple programs at the same time, thereby improving productivity and system efficiency. These features make Unix suitable for both personal and collaborative use, maximizing the system's capabilities and supporting complex, concurrent workloads .

The kernel plays a pivotal role in Unix systems as it serves as the core component managing system resources and coordinating hardware communication. It is responsible for crucial functions such as memory management, ensuring efficient allocation and deallocation of memory spaces for processes. Task scheduling, another key function, involves prioritizing and controlling process execution to optimize performance. File management operations, including organizing, reading, and writing data, also fall under the kernel's purview. Its ability to manage these resources effectively is foundational for system stability, performance, and multitasking capabilities, making it indispensable for the Unix operating environment .

Unix ensures secure access during the login process by requiring both a user ID and a password. The login process begins with the user typing their user ID at the login prompt, which is case-sensitive. Afterward, the user enters their password, which is also case-sensitive, at the password prompt. The use of case-sensitive credentials enhances security by increasing the complexity and uniqueness of authentication details. This dual-factor authentication ensures only authorized users gain access to the system. It is pivotal in protecting user data and the system from unauthorized access .

The primary components of the Unix operating system include the kernel, shell, commands and utilities, and files and directories. The kernel, considered the heart of the operating system, interacts directly with hardware and handles memory management, task scheduling, and file management. Users interact with Unix through the shell, which acts as a command line interpreter. It processes user commands, interprets them, and communicates with the kernel by invoking the appropriate programs. Commands and utilities are tools available within the Unix system that enable users to perform various operations, such as moving files or managing processes. All data in Unix is stored in files, which are organized into directories forming a structured filesystem .

The 'whoami' command in Unix is used to display the username of the current user, providing a simple and direct means of verifying identity during a session. The 'who' command, in contrast, provides detailed information about all users currently logged into the system, including their login terminals, login times, and the host name or IP address from which they are connected. While 'whoami' focuses on the current session's user identity, 'who' offers a broader view of all active user sessions, aiding in system monitoring and management .

To change a password in a Unix system, follow these steps: first, type 'passwd' at the command prompt. Enter the current password when prompted. Then type the new password, ensuring it is complex and secure enough to prevent unauthorized access. The new password must be verified by typing it again. Password complexity is crucial because it protects against unauthorized access and potential security breaches. A complex password reduces the likelihood of it being guessed or cracked by attackers, thereby safeguarding user data and maintaining overall system security .

Unix systems organize files and directories in a hierarchical, tree-like structure known as the filesystem. Each piece of data is stored in a file, and files are grouped into directories. Directories can contain subdirectories, allowing for a complex but organized filing structure. The 'ls' command is commonly used to list files and directories within a specific directory, with various options like '-l' providing detailed information about each entry, such as permissions, ownership, size, and modification date. This structure enables efficient data management and access, supporting system operations and user activities .

You might also like