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

DIT OS Notes

This document contains answers to multiple questions about operating systems. It defines an operating system and discusses its objectives and characteristics/functions/role. It describes the classification and types of operating systems including general purpose, special purpose, batch, time-sharing, distributed, network, and real-time operating systems. It also explains the parts/components of an operating system including the kernel, process management, interrupt handling, file management, memory management, and security management. It discusses the differences between server and client operating systems, and between jobs, tasks, and processes. It defines scheduling and describes types of scheduling including preemptive and non-preemptive. It also explains types of disks and disk partitioning.
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)
198 views

DIT OS Notes

This document contains answers to multiple questions about operating systems. It defines an operating system and discusses its objectives and characteristics/functions/role. It describes the classification and types of operating systems including general purpose, special purpose, batch, time-sharing, distributed, network, and real-time operating systems. It also explains the parts/components of an operating system including the kernel, process management, interrupt handling, file management, memory management, and security management. It discusses the differences between server and client operating systems, and between jobs, tasks, and processes. It defines scheduling and describes types of scheduling including preemptive and non-preemptive. It also explains types of disks and disk partitioning.
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
You are on page 1/ 11

Q.1 Define operating system and Explain its objectives ,Characteristics /function/Role of Operating System?

Answer: Operating System: An Operating System (OS) is a software that acts as an interface between computer
hardware components and the user.
Objectives:

 To manage the resources of a computer system.


 To hide the details of the hardware resources from the users
 To provide users a convenient interface to use the computer system.

Characteristics /function/Role of Operating System:

1. Memory Management
It is the management of the main or primary memory. Whatever program is executed, it has to be present in the
main memory.
2. Device Management
An operating system regulates device connection using drivers. The processes may require devices for their
use. This management is done by the OS.
3. File Management
The operating system manages resource allocation and de-allocation. It specifies which process receives the file
and for how long.
4. Managing Resources: -Operating System coordinates the entire computer’s resources including keyboard,
mouse, printer, monitor, storage devices and memory.
5. Security – For security, modern operating systems employ a firewall. A firewall is a type of security system
that monitors all computer activity and blocks it if it detects a threat.

Q.2 Discuss classification or types of operating system ?


Answer: Classification of Operating System:

1. General Purpose Operating System: - General purpose Operating System used for multipurpose. General
purpose Operating System supports large number of utility such that compiler, assembler, editor
debugging, packages, word processor and a file system for long term storage of information.
2. Special Purpose Operating System: - These types of Operating Systems are used for special purpose. In
simple word we say that these operating systems are design for unique purpose.

Types of Operating System:

1. Batch Operating System –


This type of operating system does not interact with the computer directly. There is an operator which
takes similar jobs having the same requirement and group them into batches.
2. Time-Sharing Operating Systems –
Each task is given some time to execute so that all the tasks work smoothly. Each user gets the time of
CPU as they use a single system. These systems are also known as Multitasking Systems. The task can
be from a single user or different users also. The time that each task gets to execute is called quantum.
After this time interval is over OS switches over to the next task.
3. Distributed Operating System –
Various autonomous interconnected computers communicate with each other using a shared
communication network. Independent systems possess their own memory unit and CPU. These are
referred to as loosely coupled systems or distributed systems.
4. Network Operating System –
These systems run on a server and provide the capability to manage data, users, groups, security,
applications, and other networking functions. These types of operating systems allow shared access of
files, printers, security, applications, and other networking functions over a small private network.
5. Real-Time Operating System –
These types of OSs serve real-time systems. The time interval required to process and respond to inputs
is very small. This time interval is called response time.

.
Two types of Real-Time Operating System :
1. Hard Real-Time Systems:
These OSs are meant for applications where time constraints are very strict and even the shortest
possible delay is not acceptable.
2. Soft Real-Time Systems:
These OSs are for applications where for time-constraint is less strict.

Q.3 Explain the parts/components of operating system?


Answer:
1. Kernel: A Kernel is a computer program that is the heart and core of an Operating System. The kernel is
responsible for low-level tasks such as disk management, task management and memory management.
2. Process Management: A process is basically a program in execution. The operating system has to
manage all the processes and the resources in a convenient and efficient way.
3. Interrupt: Interrupt is a signal which is sent from a device or from software to the operating system.
4. File manager: A file manager is a part of Operating System that helps a user manages all the files on their
computer.
5. Memory Manager: A memory manager is a part of operating system. It helps manage memory more
efficiently.
6. Security Management: - The security management is responsible for implementing mechanisms that
secure and protect the computer system internally as well as externally.

Q.4 Difference between server and client operating system?


Answer:
1. Server operating system: It is an operating system that is designed to be used on server. It is used to
provide services to multiple clients. It can serve multiple clients at a time and is very advanced
operating system. Example of server operating system is Red Hat, Linux etc.
2. Client operating system: It is an operating system that operates within desktop. It is used to obtain
services from a server. It run on the client devices like laptop, computer and is very simple operating
system. Example of client operating system is windows, android etc.
Q.5 Difference between Job, task and process?
Answer:
1. PROCESS: The process is a program under execution. A program can be defined as a set of
instructions. The program is a passive entity and the process is an active entity.
2. TASK: Task is a unit of work being executed.A task is a subpart of a job. Tasks combine to form a job.
3. JOB: A job is a complete unit of work under execution. A job consists of many tasks which in turn,
consist of many processes.
Q.6 Define Scheduling and explain types of scheduling?
Answer: Scheduling: Scheduling in operating system is the process of selecting a process from a ready queue
Types:
1. Preemptive Scheduling: In Preemptive Scheduling, the CPU is allocated to the processes for a specific
time period. In Preemptive Scheduling, tasks are switched based on priority.
Example: Examples of preemptive scheduling are Round Robin and Shortest Remaining Time First.
2. Non-preemptive scheduling: In non-preemptive scheduling CPU is allocated to the process until it
terminates. In Non-preemptive scheduling no switching takes place.
Example: Examples of non-preemptive scheduling are First Come First Serve and Shortest Job First.
Q.7 Explain types of Preemptive Scheduling and Non Preemptive Scheduling?
Answer: Types of Preemptive Scheduling:
1. RR (Round Robin) Time Sharing Scheduling Algorithm: -In this kind of scheduling all the processes
are given equal time of C.P.U called time slice or quantum. If a process is not completed before its C.P.U
time expires then the C.P.U is taken away and given to the next waiting process & pre-empted process is
then placed at the back of ready list.
2. SJN (shortest job next) Scheduling Algorithm: -It is also called shortest remaining time (SRT). In this
algorithm all incoming jobs are placed to their size. A job, which has less memory requirement, will be
assign to CPU first.

Types of Non-Preemptive Scheduling:


1. FIFO (first in first out) Scheduling Algorithm: According to this algorithm the incoming jobs are placed
in a queue and processed one by one at FIFO basis.processes are executed according to their arrival time
means First in First out.
2. LIFO (last in first out) Scheduling Algorithm:In this algorithm incoming jobs are placed in stack &
C.P.U is assigned to job that is at the top of stack. A Process with lowest real time (arrival time) will be
executed first.
3. SJF (shortest job first) Scheduling Algorithm: According to this algorithm first of all processes are
arranged according to their memory size and shortest job is assigned the highest priority. It means that a job
requires less memory will be given higher priority.
Q.8 Explain Disk and its types?
Answer: Disk: Disk some time referred to as a diskette is a storage device where data is recorded.
Types:
1. Hard Disk: These are also called 'fixed disks’ because the storage media is mounted within the computer
and not intended to be removed.
2. Floppy Disk: These disks are designed to allow users to store data to a disk, remove it and carry the data
elsewhere. These typically come in one of two formats in the 3.5 inch store1.44Mbytes and 5.25 inch store
1.22 Mbytes.
3. Optical disk: An optical disk is a permanent storage device. A laser beam used to read and write data on an
optical disk. It can store data up to 1 GB.
Different categories of optical disk:
CD-ROM:CD-ROM stands for compact disk read-only memory. The data stored on CD-ROM can only be read. It
cannot be deleted or changed.
DVD: DVD stands for digital video disk. It is similar to CD-ROM. It uses a laser beam with a short wavelength.
The short wavelength reads smaller holes on the disk.
WORM Disks: WORM stands for write once read many. It can only be read and cannot be updated or changed. It
can store greater volumes of information than CD-ROM. Its capacity is 200 GB.

Q.9 Define Disk partition and its types?


Answer: Disk partitioning Disk partitioning is one step of disk formatting. It is the process of dividing a disk
into one or more regions, the so called partitions.
Types:
1. Primary Partition: Primary Partition is the hard disk partition where both Windows OS and other data can
be stored, and it is the only partition that can be set active.
2. Extended Partition:.In an Extended Partition you can create unlimited logical drives. Extended partition is
not used to store data, because the Extended Partition is used to hold logical partitions.
3. Logical Partition: Also called logical partition. A volume created within an extended partition on a basic
disk. A logical drive can be formatted and assigned a drive letter, but cannot host an operating system.
Q.10 Difference between MBR and GPT?
Answer: MBR: MBR stands for Master Boot Record, and is a bit of reserved space at the beginning of the drive
that contains the information about how the partitions are organized. The MBR also contains code to launch the
operating system, and it's sometimes called the Boot Loader.
GPT:GPT is an abbreviation of GUID Partition Table, and is a newer standard that's slowly replacing MBR.
Unlike an MBR partition table, GPT stores the data about how all the partitions are organized and how to boot the
OS throughout the drive. That way if one partition is erased or corrupted, it's still possible to boot and recover some
of the data.
Q.11 Explain Register, interpreter, compiler and address bus?
Answer:
 Register: A register is a temporary storage area built into a CPU. Some registers are used internally and
cannot be accessed outside the processor, while others are user-accessible. Most modern
CPU architectures include both types of registers
 Interpreters: Interpreter directly execute instructions written in a programming or scripting language,
without having to convert them to object code or machine code prior to doing so. Perl, Python, and Matlab
are examples of interpreted languages.

Q.12 Explain Requirement of Window 7?


Answer:

1. 1 gigahertz (GHz) or faster 32-bit (x86) or 64-bit (x64) processor*


2. 1 gigabyte (GB) RAM (32-bit) or 2 GB RAM (64-bit)
3. 16 GB available hard disk space (32-bit) or 20 GB (64-bit)
4. DirectX 9 graphics device with WDDM 1.0 or higher driver.

Q.13 Explain Window 7 installation Steps?


Answer:

1. Boot your PC using Windows 7 DVD/USB drive and press any key if you see Press any key to
continue message.
2. Next select your language, keyboard type (Generally the US) and time format.
3. Click the Install button.
4. Click the box labeled I agree with the license terms and click Next to proceed further.
5. In the next screen, click on the Custom (advanced) option. I hope you are not upgrading here. If you are
doing an upgrade then just clicks on the Upgrade option.
6. This is an important step as you need to select the drive where you would like to install Windows 7. Note
that selecting a wrong partition will wipe out the data. You can also format the selected partition by
opening drive option and then choosing the Format option.
7. Click on the Next button to start the Windows 7 installation. Windows may restart many times during the
installation and you need not worry about that.
8. After completing the installation, Windows will give you the below screen to enter your username and
password.
9. In the next step you will be asked to enter the Product Key. Enter the key that you have got and click
the Next button.
10. Here you need to select the Windows 7 update option. Click Use recommended settings option.
11. Select Time Zone, date and time and click Next.. In the next screen, you need to select the type of network.
That is, choose between Home network, Work network and Public network.
12. Finally, the setup will ask you to create a group depending on the type of Network you have chosen. If you
are not sure, just skip as you can do it later as well.
13. You will see the Windows 7 desktop. That is, you have successfully installed Windows 7 on your PC.

Q.14 Discuss Disk Management in window 7?


Answer: Disk Management is the tool in Windows used to change drive letters, format drives, shrink partitions,
and perform other disk tasks.Disk management process perform by following steps

1. Log on as administrator or as a member of the Administrators group.


2. Click Start -> Run -> type compmgmt.msc -> click OK.
3. Alternatively, right-click on the My Computer icon and select 'Manage'.
Q.15 How to create a new partition or a new logical drive?

Answer:

1. Open Computer Management by selecting the Start button. The select Control Panel > System and
Security > Administrative Tools, and then double-click Computer Management.
2. In the left pane, under Storage, select Disk Management.
3. Right-click an unallocated region on your hard disk, and then select New Simple Volume.
4. In the New Simple Volume Wizard, select Next.
5. Enter the size of the volume you want to create in megabytes (MB) or accept the maximum default size,
and then select Next.
6. Accept the default drive letter or choose a different drive letter to identify the partition, and then
select Next.
7. In the Format Partition dialog box, do one of the following:
8. If you don't want to format the volume right now, select Do not format this volume, and then select Next.
9. To format the volume with the default settings, select Next.
10. Review your choices, and then select Finish.

Q.16 Explain Configuration of device drivers?


Answer: Configuration of device drivers

1. Open device manager click - Start Menu -> Control Panel -> System and Security -> System -> Device
Manager.
2. You will see all your hardware listed. You need to check if you have any yellow exclamation marks next to
the name of the devices this indicates that the driver has not been installed for this device.
3. At this stage you can install the driver for this device. To do so, Right Mouse click on the device and select
Update Driver Software.
4. You can choose to "Search automatically for updated driver software" or "Browse my computer for driver
software". If you have the driver CD or if the driver is on a USB drive then choose "browse my computer
for driver software".
5. Window 7 will search and install the driver from the CD or you can locate the driver manually.
6. Once you have removed all the yellow exclamation marks from the device manager your Windows 7
configuration would be fully complete.

Q.17 Explain Configuration of Printer?


Answer: Configuration of Printer:
1. Click the Start and then choose the Control Panel option.
2. The Control Panel window opens up. Click Device and Printer.
3. The Device and Printer window opens up with the list of all external devices and printer.
4. Click Add a printer to add new printer.
5. Click Add a local printer.
6. Chose the Printer Port and Click Next.
7. Click Have Disk to install Printer Driver. Browse driver location and click Ok.
8. Choose Manufacturer and Printer. Click Next.
9. Type Printer Name and Click Next.
10. Click Finish.

Q.18 Configure network connectivity on windows 7?


Answer: Network connectivity Steps

1. Go to the Start Menu and select Control Panel.


2. Click the Network and Internet category and then select Networking and Sharing Center.
3. From the options on the left-hand side, select Change adapter settings.
4. Right-click on the icon for Wireless / Local Area Connection and click enable.
5. If you are going to Connect Wireless Network Then Right Click n The Wireless Network and Click on
Connect give password.

Q.19 Explain Remote Access Setting For A Windows 7 Client Computer?

Answer: Remote Access Setting For A Windows 7 Client Computer


Remote Desktop Connection is a technology that allows you to sit at a computer (sometimes called the client
computer) and connect to a remote computer (sometimes called the host computer) in a different location.
1. Open Control Panel > User Accounts
2. In the Control Panel, click on the System and Security link
3. Under System click on Allow remote access
4. Select Allow connections only from computers running Remote Desktop with Network Level
Authentication under Remote Desktop. Click Apply.
5. Click on the Select Users button and add the users that you would like to grant access to via Remote
Desktop, click on the user and click OK when done.
6. Click OK 3 times to exit all of the dialog boxes.
7. Your Windows 7 Machine is now ready to be connected via Remote Connection.
Q.20 Discuss Connecting to a Remote Desktop?
Answer: Connecting to a Remote Desktop
1. Click on Start Button select All Programs > Accessories > Remote Desktop Connection
2. Type the address of the remote computer in the Computer: text box, click Connect
3. Sign-on to the computer when prompted for credentials.
Q.21 Discuss Configure File Access / File and Folder Sharing In Windows 7?
Answer: Configure File Access / File and Folder Sharing In Windows 7
1. To turn on File and folder sharing, follow these steps:
2. Open My Computer Right click on Drive or Folder which you want to share with other.
3. Select Property option from Below
4. In Appearing properties Box select Sharing Tab.
5. Click on Advanced Sharing Button from appearing Properties Box.
6. Check the Box Share This Folder. Give The Share Name and Then Click on Permission Button.
7. Set the Permissions and select the User
8. Click on Ok button Two Time and close the properties box.
Q.22 Windows Server 2008 installation Steps?
Answer:
1. Boot your computer with Windows Server 2008 installation media .
2. When prompted for an installation language and other regional options, make your selection and press
Next.
3. Next, press Install Now to begin the installation process.
4. Enter your Product ID in the next window, and if you want to automatically activate Windows the moment
the installation finishes, click Next.
5. Select the Full version of the right Windows version you're prompted, and click Next.
6. Read and accept the license terms by clicking to select the checkbox and pressing Next.
7. Select Custom (Advanced) installation option for New and Clean Window Installation.
8. Next screen select the drive usually Disk 0, and click Next.
9. The installation now begins, copying the setup files from the DVD to the hard drive, extracting and
uncompressing the files after a while the operating system is installed.
10. The installation process will reboot your computer
11. Then the server reboots you'll be prompted with the new Windows Server 2008 type of login screen. Press
CTRL+ALT+DEL to log in.
12. Click on Other User.
13. The default Administrator is blank, so just type Administrator and press Enter.
14. You will be prompted to change the user's password. You have no choice but to press Ok.
15. In the password changing dialog box, leave the default password blank and enter a new, complex, at-least-
7-characters-long new password twice. Press Ok
16. Finally, the desktop appears and that's it, you're logged on and can begin working.
Q.23 What are The Server Roles and its Features?
Answer:
The Server Roles and its Features
A server role is a set of software programs that, when they are installed and properly configured, lets a computer
perform a specific function for multiple users or other computers within a network.
Windows 2008 includes the following roles:
1. Active Directory Domain Services:Active Directory Domain Services (AD DS) is a server role in Active
Directory that allows admins to manage and store information about resources from a network, as well as
application data, in a distributed database.
2. DHCP Server:Dynamic Host Configuration Protocol (DHCP) is a network protocol that enables a server
to automatically assign an IP address to a computer from a defined range of numbers (i.e., a scope)
configured for a given network
3. DNS Server:Domain Name Servers (DNS) are the Internet's equivalent of a phone book. They maintain a
directory of domain names and translate them to Internet Protocol (IP) addresses. This is necessary
because, although domain names are easy for people to remember, computers or machines, access websites
based on IP addresses.
4. Application Server:The application server is a framework, an environment where applications can run, no
matter what they are or what functions they perform. An application server can be used to develop and run
web-based applications.
5. Terminal Services:Enables users to access Windows-based programs that are installed on a terminal server
or to access the Windows desktop from almost any computing device that supports the RDP protocol. Users
can connect to a terminal server to run programs and to use network resources on that server.
6. Print Services:Enables the management of print servers and printers. A print server reduces administrative
and management workload by centralizing printer management tasks.

Q.24 How we install and configure the Active Directory Domain Services?
Answer: Creating Active Directory
1. Run Server Manager
2. Select Add Role and Then Select The Active Directory Domain Services from List of Role
3. After this Click start > run and type dcpromo and press enter.
4. Active directory installation wizard will be started.
5. Click next and select the “domain controller for a new domain and click next.
6. Select a domain in the new forest.
7. Provide the fully qualified domain name and click next.
8. Enter the NETBIOS name and click next.
9. Set the Active directory restore password. It is not the same as your domain administrator password.
10. Click next.
11. Active directory installation process begins.
12. During the installation process do not click cancel. The installation process will automatically be
completed. When the installation is completed click finish and restart the computer.

Q.25 What is Group Policy??


Answer: Group Policy is simply the easiest way to reach out and configure computer and user settings on networks
based on Active Directory Domain Services (AD DS).
To create a Group Policy Object (GPO)

1. Open the GPWalkthrough MMC console.


2. Click the + next to Active Directory Users and Computers, and click the reskit.com domain.
3. Click the + next to Accounts to expand the tree.
4. Right-click Headquarters, and select Properties from the context menu.
5. In the Headquarters Properties page, click the Group Policy tab.
6. Click New, and type HQ Policy.

To delegate administrative control of a GPO


Access the Group Policy snap-in for the GPO.

1. Right-click the root node of the console and click Properties.


2. Click the Security tab, then click the security group for which you want to allow or deny administrative
access to the GPO.
3. To provide administrative control of all aspects of the GPO, set the Read permission to Allow and set the
Write permission to Allow.
4. Click OK.

Q.26 Discuss Managing User and Group Accounts?


Answer:
Managing User and Group Accounts
Creating User Account
1. Logon to Windows server 2008 with Administrator account.
2. Click on Start button and from the appeared menu click on Server Manager.
3. On the opened box in the left pane expand Configuration tree.
4. From the expanded list double-click on Local Users and Groups.
5. From the center pane double-click on Users.
6. Right click anywhere in the center pane and from the appeared menu click on New User.
7. On New User box populate that required fields with appropriate information and uncheck User must
change password at next logon checkbox.
8. Once done, click on Create button to create the user with the specified name.
Creating Domain User Account
1. Click Start, select Administrative Tools and click Active Directory Users and Computers.
2. In Active Directory Users and Computers, navigate to the folder where you want to store the new user.
3. Right in click the user list and click New User.
4. Right in click the user list and click New User.
5. Fill in the new user information and click Next.
6. Fill in the password information and click Next.
7. If the account will be used by a service application like SQL Server, uncheck User must change password
at next logon and check the options below.
8. User cannot change password
9. Password never expires
10. Click Finish.

Q.27 Explain Linux installation steps?


Answer: Linux installation steps
1. Boot your computer with Linux bootable CD.
2. First of all welcome screen appear.
3. Click on the Next button to continue.
4. Next Using your mouse, select the language you would prefer to use for the installation.
5. Once you select the appropriate language, click Next to continue.
6. Next Set Keyboard Configuration, Using your mouse, select the correct layout type (for example, U.S.
English) for the keyboard you would prefer to use for the installation and as the system default. Once you
have made your selection, click Next to continue.
7. Next Set the Mouse Configuration,
8. Next Select Installation Type, Choose the type of installation you would like to perform. Your options are
Personal Desktop, Workstation, Server, Custom, and Upgrade.
9. Next Disk Partitioning Setup option will appear, Select Automatic partitioning allows you to perform an
installation without having to partition your drive(s) yourself. To partition manually, choose the Disk Druid
partitioning tool.
10. Next select the Boot Loader Configuration .In order to boot the system without a boot diskette, you usually
need to install a boot loader. A boot loader is the first software program that runs when a computer starts.
11. Next Set the Network Configuration. If you do not have a network device, you will not see this screen. The
installation program will automatically detect any network devices you have and display them in the
Network Devices list. Once you have selected a network device, click Edit. From the Edit Interface pop-up
screen, you can choose to configure the IP address and Net mask of the device via DHCP (or manually if
DHCP is not selected) and you can choose to activate the device at boot time.
12. Next Set the Root Password. The root account is used to install packages, upgrade RPMs, and perform
most system maintenance. Logging in as root gives you complete control over your system.
13. After your partitions have been selected and configured for formatting, you are ready to select packages for
installation.
14. Unless you choose a custom installation, the installation program will automatically choose most packages
for you. To select packages individually, check the Customize the set of packages to be installed checkbox.
15. Next screen preparing you for the installation of Red Hat Linux.

Q.28 Creating a User Account In Linux?


Answer: There are two ways to create new user accounts:
1. Using the graphical User Manager application
2. From a shell prompt.
To create a user account graphically using the User Manager:
1. Select Applications (the main menu on the panel) => System Settings => Users & Groups from the panel.
2. You can also start the User Manager by typing redhat-config-users at a shell prompt.
3. If you are not logged in as root, you will be prompted for your root password.
4. The window shown in Figure 1-16 will appear. Click Add User.
5. In the Create New User dialog box, enter a username and other Information.
6. Click OK. The new user will appear in the user list.
To create a user account from a shell prompt:
1. Open a shell prompt.
2. If you are not logged in as root, type the command su - and enter the root password.
3. Type useradd Command
4. Useradd < user name> Press Enter Key
5. Now Type passwd command
6. Passwd Press Enter Key
7. At the New password: prompt enter a password for the new user and press [Enter].
8. At the Retype new password: prompt, enter the same password to confirm your selection.

Q.29 Explain Linux File System ?


Answer: Linux File System
Linux File System is a layer which is under the operating system that handles the positioning of your data on the
storage, without it the system cannot knows which file starts from where and ends where.
Linux offers following file system:
 Ext: an old one and no longer used due to limitations.
 Ext2: first Linux file system that allows 2 terabytes of data allowed.
 Ext3: came from Ext2, but with upgrades and backward compatibility. This file system doesn’t support file
recovery or disk snapshots.
 Ext4: faster and allow large files with significant speed. It is a very good option for SSD disks and this one
is the default file system that Linux suggests.
 JFS: old file system made by IBM. It works very well with small and big files, but it failed and files
corrupted after long time use.
 XFS: old file system and works slowly with small files.

Q.30 Discuss Some Important Linux Commands?


Answer
1. mkdir Command:
Purpose: mkdir command is used for creating new directory (Folder). We also used some option with
mkdir command.
Syntax: mkdir [- option] Directory Name
Where Option are:
- p Parent directory creator. If directory, not exists.
-m Assign Permission default 755 mean Read, Write and execute Access for owner and Read and Execute
Access for Other user and Group.
For example : mkdir [-m] Toqeer 755
2. cd Command OR chdir Command
Purpose: Change current directory to directory which are specify in the command. We also use chdir
command for this purpose.
Syntax: cd Directory name
For example : Cd Toqeer
3. rmdir Command
This Command is used to delete the directory. Directory must be empty.
Syntax: rmdir [-option] Directory name
Where Option are: –s Give the message for confirmation
For Example: rmdir -s Toqeer
After typing this command delete the folder name toqeer and before deleting give the confirmation
message.
4. rm Command:
Purpose: This command used to delete the folder and files and also sub folder if existing.
Syntax rm [-r –f –I ] Directory
Where
–r means delete all the sub folder, -I means give message before deleting, -f mean delete also write
protected file
For Example : rm -m Toqeer
After typing this command and pressing Enter Key the folder Toqeer And All its files and subfolder
deleted.
5. ls Command
Purpose: This command displays the list of files and folder of the working directory.
Syntax : ls [-option]
Where option are:
-a display all the files including those files start with dot ( . ) means hidden files.
-A all the files including start with double dot.
-l display the long list means that all the information about files and folders.
-R in reverse order.
For Example : ls – l
6. cat Command
Purpose: This command read the data form standard input and then out put in the different forms. In
simple word we say that CAT command is used for three different purposes.
First to create a new file for this purpose we use cat command in this way
cat > file name
Second we create a file for an other file we use cat command in this way
cat source file name > destination file name
Where source file is file from which we create a new file. And destination file is new file name.
if we want to merge the file contents with an other file we use cat command in this way:
cat source file name >> destination file name
With this command Contents of source file merge with contents of Destination file.
Cat command also display the Contents of file. For this purpose we use cat command with simple file
name.
7. cat File name
For Example : cat > test.txt
After this type the contents of file and then press CTRL + D Key for save the file.
Cat Test.txt
This command Display the contents of file test.txt.
Cat test.txt > New.txt
This command Create a new file name new.txt and copy the contents of test.txt in to new.txt
Cat test.txt >> new.txt
This command add the contents of test.txt in to new.txt
8. cp Command:
Purpose :This command copy the file form one location to other location or Copy the contents of one file
to an other file
Syntax : cp [option] (source file name) (destination / or Directory name)
Where option are:
-I Give the message if overwriting occur
-p Preserve that permission is granted.
For Example : cp test.txt toqeer
Where test.txt is file name and Toqeer is folder name where we want copy test.txt.
We also use cp command in this way
cp test.txt new.txt
In this way contents of first file copy in second file.
9. mv Command:
Purpose :This command is used for two purposes.
First Move the file or folder from one location to other location.
This command also used for Renaming the file and folders.
Syntax: mv source file/folder Destination
For Example : mv test.txt New
This command change the name file text.txt to shah.txt
10. ln Command:
Purpose: Create a link to the specified TARGET with optional LINK_NAME. If LINK_NAME is omitted,
a link with the same base name as the TARGET is created in the current directory.
Syntax : ln file name Link File name
For Example : Ln test.txt welcome.lnk
11. file Command: -
Purpose: This command describes the nature of file.
Syntax: file test.txt
For Example : file Test.txt
Return ASCII Text File
12. wc Command: -
Purpose: This command Count the Contents of file. For example total number of Character, Word and
lines.
Syntax: wc [ -Option] File Name
Where Option are:
-c Count the Total Character, -l Count The Total line, - W Count The total Word
FOR EXAMPLE: wc [-c] Test.txt
Display the Total Character of the File Test.txt
13. Calendar Command: -
Displays appointments and reminders for the date.
Syntax:
Before you can do the calendar program you must have a file named calendar at the root of your profile.
Within that file you may have something similar to:
7/7/2000 You have a meeting today.
Then add at the end of your .login or .profile calendar and then when you log on 7/7 it will display the
message: 7/7/2000You have a meeting today.
Examples: calendar
Display appointments if any.
14. cal Command: -
Purpose: This command display the calendar of the year
Syntax: cal [Month] [Year]
Where month and year are optional if we type only CAL command then display the current calendar.
FOR EXAMPLE : cal march 2006
After typing this command and pressing Enter Key Calendar of March 2006 is display on the screen.
15. passwd Command: -
PURPOSE: This Command changes the user Password.
SYNTAX: passwd User Name [-d][-f]
Where –d for deleting the password
-f means that you user must be change the password.
16. chown Command: -
Purpose
Change the Owner of file, you can also specify the Privileges of the file same time when you change the
Owner.
SYNTAX
chown User ID File Name
17. who Command: -
PURPOSE: This Command Display The list of those users who are Currently Login.
SYNTAX: Who [-s][-q][-h][-i]
Where -s means that Display the User ID, -H Column Header, -q Display quick Information consist on only
user ID, -I Also send the message
18. who am i Command: -
PURPOSE: -This tells that who ere you, Means That Log in Name of the user.
SYNTAX:- who am I
19. Tee Command: -
PURPOSE: Read from an input and write to a standard output or file.
SYNTAX: Tee [a] File name / List
Where –a means that if file already exist then insert the data in previous file.
For Example:: ls *.txt | wc -l | tee count.txt
In the above example the ls command would list all .txt files in the current directory, take a word count
(wc) by the amount of lines (-l) and the output will be sent to the count.txt.
20. Write Command:
Purpose: This command used to send the message to the other user right at the same time when you type
the message it will be send at real time message to the online user whose name is specified in the
command. In the end press CTRL+D or Z key for stop this process.
Syntax: Write User Name List
Message
Press CTRL+D or Z
For Example : Write user01
Hello how are You my Friend
When You press Enter key this message Transmit to User01. For end of session Press CTRL+D or
CTRL+Z key.
21. mesg Command : -
Lets you control if people can use the write command, to send text to you over the screen.
Syntax: mesg [n | y]
n Prevents the messages from others popping up on your screen.
y Allows messages to appear on your screen.
Examples: mesg
Typing this command by itself will display whether or not the mesg service is enabled. For example, it may
display: "is y", indicating that it is enabled. Typing n or why after the command would enable or disable
this command.
22. wall Command: -
Purpose
This command is used to display the message to all those users who are currently logged on to the system.
wall command is differ form write command because write command send the message to specify users but
wall command send the message to all user.
Syntax: Wall message (Press CTRL+Z key)
The length of the message is limited to 20 lines.
For Example : Wall message
Please Shut Down You PC
CTRL+Z
23. Mail Command: -
This command is used to read/send E-Mail the mail to any user in Network. If User currently not login then
mail store in the mail box of that user. User can check this mail at any time when he/she login by typing
mail and press enter key.
SYNTAX: Mail User ID
Write text-------
Press CTRL +D Key to save
Also you can send the file with mail command
For this purpose write command in this way
Mail User name < File Name
24. Clear Command: -
PURPOSE: This command clears the contents of the screen.
SYNTAX: Clear
25. Vi Command:
This command is used to edit the file are create new file. Using Screen-oriented (visual) display editor
based.
SYNTAX: Vi file name
For Example: vi test.txt
26. pico Command: -
PURPOSE: This command is used for creating a new file are edit the previous store file.
SYNTAX: Pico < File name>
For Example:: Pico Test.txt
27. less Command: -
PURPOSE: This command Write The Contents of file on the screen. You can not edit the file with this
command. Jus like Type command in DOS.
SYNTAX: Less < File Name>
For Example: Less test.txt
28. tar Command: -
PURPOSE: Create archives file or extract archives file.
SYNTAX:: tar -czvf name-of-archive.tar.gz /path/to/directory-or-file
Creating a tar file: tar -czvf archive.tar.gz stuff
Where archive.tar.gz is tar file.
Extracting the files from a tar file:
tar -cvvf home.tar home/
29. deluser Command: -
PURPOSE: This command deletes the user from Linux Server. Or Remove the Login Name.
SYNTAX: deluser User Name
For Example: deluser user01
30. more Command: -
Purpose: The more command is used to display the contents of file page by page. The more command
pauses at the end of each page and by pressing Space Bar key Next page is display.
Syntax: More [+ Line Number] File name
Where Line number is optional which specify the Starting Line Number.
- lines
For Example More Test.txt
OR More +20 test.txt
31. Tail COmmand: -
Purpose: Display the contents of file from one specific point to an other specific point. (Top to Tail).
We say that
Delivers the last part of the file.
Syntax: Tail +Start Line number test.txt [+ End Line Number] File Name
Last Line Number is optional
For Example: Tail myfile.txt
The above example would list the last 10 (default) lines of the file myfile.txt.
tail myfile.txt -n 100
The above example would list the last 100 lines in the file myfile.txt.
32. Head Command: -
Purpose: This command display the contents of file form top to Specific Number Of line.
Normally this command Displays the first ten lines of a file, unless otherwise stated.
Syntax: Head [- Number] file Name
For Example: head -15 myfile.txt
33. Finger Command: -
Purpose: Display the detail of Information of the user. If we specify the user name then information about
that user is display other wise information of all currently login is display.
Syntax: Finger [user name]
Where user name is optional.
For Example: finger -b -p ch
34. at Command: -
Purpose: Schedules a command to be ran at a particular time, such as a print job late at night.
Syntax: at Time
Command
For Example: At 04:00
write
This is Class Time
(Press CTRL + D)
35. Shutdown Command: -
Purpose:
Turn off the computer immediately or at a specified time.
Syntax: Shutdown –g –y
Where –g give the 60 second to user save work and log out and –y means that disconnect the user with out
confirmation
For Example: shutdown 8:00
Shutdown the computer at 8-oclock
36. ps Command: -
Purpose: The ps command is used to provide information about the currently running processes, including
their process identification numbers (PIDs)
Syntax: Ps
For Example: ps
This will return the following Report
PID TTY TIME CMD
12330 pts/0 00:00:00 bash
21621 pts/0 00:00:00 ps
37. kill Command: -
This command stopped the running process in background or we say Cancels a job.
SYNTAX: Kill [-Signal] [ Process ID]
FOR EXAMPLE: kill -s kill 1230
38. Exit Command: -
Allows you to exit from a program, shell or log you out of a Unix network.
Syntax: exit
Examples: exit - If supported would exit you from the program, shell or log you out of network.
39. gzip Command
Purpose: Compress or expand files.
Syntax: gzip [ -a c d] [-S suffix] [ name ... ]
-d decompress the file.
Examples: gzip myfile
Compresses the file myfile, making it myfile.gz. Note. When doing this the original file will no longer exist
on the drive.
40. Login Command: -
Purpose: Signs into a new system.
Syntax: login [ -p ] [ -d device ]
Examples: login computerhope.com
41. man Command: -
The man command which is short for manual provides in depth information about the requested command
or allows users to search for commands related to a particular keyword.
Syntax : man [-] [-k keywords] topic
Examples: man mkdir
Lists help information on the mkdir command.

You might also like