Sunteți pe pagina 1din 7

EXPERIMENT NO.

Aim / Title: Internal & External DOS and Linux commands

Problem Statement: Study and practice of Internal & External DOS and Linux terminal.

Objectives: In this experiment students will become familiar with the different commands
dealing with subdirectories . and Ubuntu Linux environment.

Outcomes: Student will learn command line, or text-based interface in DOS and Linux.

Pre-requisite: Basic knowledge of Computer

Hardware requirements: PC

Software requirements: Windows OS and Fedora OS.

Theory:

MS DOS abbreviated from Microsoft Disk Operating System. It is a single user and single tasking
operating system developed for pc. It was specially designed for the family of Intel 8086
microprocessors. The command line used in interface of MS-DOS is most commonly known as
DOS PROMPT.A very common programming is also done in MS DOS which is called Batch File
Programming.

To start using MS DOS, use the following steps:-

 Go to start.
 Click on Run.
 Write cmd or command.
 Command Prompt screen appears.
Now talking further on DOS, we learn that 2 types of commands reside in it. They are:-

 Internal Commands or Memory-Resident Commands


 External Commands or Disk-Resident Commands

 INTERNAL COMMANDS
Internal commands are nothing but the built-in commands that are shipped along with the
operating system . The internal commands reside in COMMAND.COM which loads into
memory when the computer system is started. These commands are not occupied on disk.

1. DIR Command
The ‘DIR Command’ lists up the files and subdirectories in a directory.

Syntax:

C:\>dir [drive:] [path] [filename] ←


For Eg:-
C:\>dir ←
C:\>dir f: ←
The above command will list up the contents of drive f.

C:\>dir c:\windows\system32\drivers ←
The above command will list up the contents of above specified path.

2. MKDIR Command(MD Command)


The above command creates a directory.
Syntax:-
C:\>mkdir [drive:] [path] ←
For Eg:-

C:\>mkdir pictures ←
The above command will create a directory named pictures.

3. CHDIR(CD) Command

The chdir change directory, which is a replacement command for the ‘cd command’. Syntax:-

C:\> chdir [\d] [drive:] [path:] ←


For Eg:- C:\> cd windows ←
For the above command the directory path changes to windows folder in c: drive.C:\WINDOWS>

4 . RMDIR (RD) Command


The ‘rmdir’ command is short for the remove directory, .
Syntax:- C:\> rmdir [/s] [/q] [drive:]path ←

5. TIME Command
The above command will display or set the time.

Syntax:- C:\>time ←

External Commands
External commands are the commands that are often created while installing a new application
and these commands mostly have no use except calling that application and support files.

1. ATTRIB Command
Attrib allows a user to change the properties of a specified file. Using attrib, the user has the
capability of changing the file to have any of the below attributes. For Eg:- to hide or unhide a file.
Read–Only – Allows the file to be only viewed and not written to.

Hidden – Making the file invisible to standard users.

Syntax:- ATTRIB [+R | -R]] [+H | -H] [[drive:][path]filename]

2. CHKDSK Command
Chkdsk is a utility that checks the computer's hard drive status for any cross-linked or any
additional errors with the hard drive.

Syntax:- CHKDSK [drive:][[path]filename]

3. FORMAT Command
Format is used to erase information of a computer disk or fixed drive.

Syntax:- C:\>format [drive:]

4. TREE Command
Allows the user to view a listing of files and folders in an easy to read listing. It is used to display
the current directory or any other directory or path in a graphical format.

Syntax:- C:\>tree [drive:] [path] [/F] [/A]

5. SHUTDOWN Command
The above command deals with the shutdown process of computer i.e. logging off, shutting down
and restarting the computer.

Syntax:- C:\>shutdown [-s] [-l]

-s shuts down the computer.

-l logs off the computer.

Linux terminal commands.

Theory:

UNIX has been a popular OS for more than two decades because of its multi-user, multi-tasking
environment, stability, portability and powerful networking capabilities.
1.ls Command

1. ls [option(s)] [file(s)]

If you run ls without any additional parameters, the program will list the contents of the current
directory in short form. –l displayed detailed list –a displays hidden files.

2. mkdir Command
mkdir [option(s)] directoryname

Creates a new directory.the directory path changes to windows folder in c: drive. C:\WINDOWS>

3. rmdir Command
rmdir [option(s)] directoryname

Deletes the specified directory, provided it is already empty

4. chmod Command
chmod [options] mode file(s)

Changes the access permissions.

The mode parameter has three parts: group, access, and access type. group accepts the following
characters:

u -user

g-group

o-others

For access, access is granted by the + symbol and denied by the - symbol. The access type is
controlled by the following options: r-read w-write x-execute

5. uname command
The command ‘uname‘ displays the information about the system Syntax:-

uname -a It prints all the system information . uname-s: It prints the kernel name.

6. pwd Command

The pwd command is a command line utility for printing the current working directory.

Syntax: pwd

7. cat Command
Cat command allows us to create single or multiple files, view contain of file, concatenate files
and redirect output in terminal or files. Syntax: cat [OPTION] [FILE]...

View Contents of Multiple Files in terminal

cat file1 file2

Appending Standard Output with Redirection Operator

cat file1>> file2

8. who Command
The who command is used to get information about currently logged in user on to system.

Syntax : who [options] [filename]

Conclusion:. .After learning DOS and linux commands will able to organize file, structure
documents and able to learn, Linux environment .
.
Sample Viva Questions and Answers:

• What is Microsoft Dos and Windows Command Line?.

• What is an external and internal Command?

• Which command of MS-DOS is used to copy only files.


• Which DOS command will format a floppy disk.

• What is the advantage of open source?

• What are the basic components of Linux.

• What is the advantage of Linux.

• What is Linux Kernel?


Date of Date of Sign of Sign of
Roll.No Name of Students Performance Evaluation Grade Student Faculty

S-ar putea să vă placă și