UNIVERSITY OF CHAKWAL
DEPARTMENT OF COMPUTER SCIENCE
& INFORMATION TECHNOLOGY
(Operating System)
Lab 01
Introduction to
Operating systems and
CMD commands
Lab Objectives:
Introduction to Operating System
Operating Systems Types
Introduction to CMD commands for Windows
Page 1 of 7
UNIVERSITY OF CHAKWAL
DEPARTMENT OF COMPUTER SCIENCE
& INFORMATION TECHNOLOGY
(Operating System)
[Introduction]
A computer system can be divided into 4 components:
Hardware (CPU, memory, input/output devices, etc.),
Operating system,
System programs (word processors, spread sheets, accounting software’s, compilers,)
Application programs.
In 1960’s definition of an operating system is “software that controls the hardware”. However,
today, due to microcode we need a better definition. We see an operating system as the programs
that make the hardware useable. In brief, an operating system is the set of programs that controls
a computer.
An Operating system is software that creates a relation between the User, Software and Hardware.
It is an interface between the all. All the computers need basic software known as an Operating
System (OS) to function.
The OS acts as an interface between the User, Application Programs, Hardware and the System
Peripherals. The OS is the first software to be loaded when a computers starts up. The entire
application programs are loaded after the OS
[Operating Systems Types]
Single- And Multi-Tasking Operating Systems
A single-tasking system can only run one program at a time, while a multi-tasking operating system
allows more than one program to be running in concurrency. This is achieved by time-sharing,
dividing the available processor time between multiple processes that are each interrupted
repeatedly in time slices by a task-scheduling subsystem of the operating system.
Multi-tasking may be characterized in preemptive and co-operative types. In preemptive
multitasking, the operating system slices the CPU time and dedicates a slot to each of the programs.
UNIX-like operating systems, e.g., Solaris, Linux, as well as AmigaOS support preemptive
multitasking.
Page 2 of 7
UNIVERSITY OF CHAKWAL
DEPARTMENT OF COMPUTER SCIENCE
& INFORMATION TECHNOLOGY
(Operating System)
Single- And Multi-User Operating Systems
Single-user operating systems have no facilities to distinguish users, but may allow multiple
programs to run in tandem. A multi-user operating system extends the basic concept of multi-
tasking with facilities that identify processes and resources, such as disk space, belonging to
multiple users, and the system permits multiple users to interact with the system at the same time.
Time-sharing operating systems schedule tasks for efficient use of the system and may also include
accounting software for cost allocation of processor time, mass storage, printing, and other
resources to multiple users.
Distributed Operating Systems
A distributed operating system manages a group of distinct computers and makes them appear to
be a single computer. The development of networked computers that could be linked and
communicate with each other gave rise to distributed computing. Distributed computations are
carried out on more than one machine. When computers in a group work in cooperation, they form
a distributed system.
Embedded Operating Systems
Embedded operating systems are designed to be used in embedded computer systems. They are
designed to operate on small machines like PDAs with less autonomy. They are able to operate
with a limited number of resources. They are very compact and extremely efficient by design.
Real-Time Operating Systems
A real-time operating system is an operating system that guarantees to process events or data by a
specific moment in time. A real-time operating system may be single- or multi-tasking, but when
multitasking, it uses specialized scheduling algorithms so that a deterministic nature of behavior
is achieved. An event-driven system switches between tasks based on their priorities or external
events while time-sharing operating systems switch tasks based on clock interrupts.
[Introduction to Windows CMD Commands]
Majority of the students with already computer background may be familiar with this, but just
align all the students, this is a first exercise to practice the basics of DOS Scripting.
Page 3 of 7
UNIVERSITY OF CHAKWAL
DEPARTMENT OF COMPUTER SCIENCE
& INFORMATION TECHNOLOGY
(Operating System)
What Is CMD
CMD stands for Command (.CMD). A command is an instruction given to a computer program
that tells the program what has to be done. It is an application that is found in most computers with
Windows as the Operating System, and it helps in the execution of the commands entered. It is
also called Command Prompt or Windows Command Processor.
How to Open CMD In Windows
Opening Command Prompt in the Windows Operating System is as simple as a few clicks.
Step 1: Go to the Start Menu. This is at the bottom left of the screen. RUN.
Step 2: Type cmd in the search bar and hit Enter. The ones who love shortcuts in Windows can
also use Windows+R which routes them to RUN, and then type cmd and hit enter.
Note: The best thing about these commands in Windows is that they are not case sensitive, which
makes it user friendly.
[Basic CMD Commands]
File commands
Some of the most basic commands you must know are the file commands. They’re essential if you
want to navigate through the directories on your computer and be able to work with files and
folders.
1: Dir
If you need to work with files and folders in Command Prompt, the dir command is essential. Use
it to list the contents of a directory so that you know what files and folders are in it:
Page 4 of 7
UNIVERSITY OF CHAKWAL
DEPARTMENT OF COMPUTER SCIENCE
& INFORMATION TECHNOLOGY
(Operating System)
2: Cd
Cd is a basic CMD command that allows you to change the current directory. In other words, you use it
to navigate to another folder on your PC. Its basic syntax is:
cd [path to folder]
3: Copy
Another basic command that fulfills a basic need in Command Prompt is copy. At some point or
the other, while working in the command line, you will get to the point where you need to copy a
file or two, or more, from one directory to another. Command Prompt has more than one
command that helps you achieve that, but the main one and the one to start from is copy. Its
syntax is simple:
copy [path\file.ext] [path\newfile.ext]
For example, we wanted to copy a file called digitalcitizen.txt to the same folder but bearing a
different name: test.txt. For that, we had to run this command:
copy digitalcitizen.txt test.txt
Page 5 of 7
UNIVERSITY OF CHAKWAL
DEPARTMENT OF COMPUTER SCIENCE
& INFORMATION TECHNOLOGY
(Operating System)
14. Del
What if you want to erase a file you no longer need? Easy as pie: use the del command.
In Command Prompt, all you need to do is type:
del [file name]
… followed by the name of the file you want to remove. Or, you can specify a folder’s name if
you want to erase all the files in it.
Page 6 of 7
UNIVERSITY OF CHAKWAL
DEPARTMENT OF COMPUTER SCIENCE
& INFORMATION TECHNOLOGY
(Operating System)
Try some more commands by yourself and see the result
Logoff
Shutdown
Ver
Systeminfo
(ping [IP Address])
(ping www.google.com.pk)
(tracert www.google.com.pk)
(Note: To stop the traceroute process, enter Ctrl+C)
Page 7 of 7