Microsoft DOS mode command

Quick links

About mode
Additional Information

About mode

Mode status is used to view or modify a port or display setting.


The command is an external command that is available in the below Microsoft operating systems.

All Versions of MS-DOS
Windows 95
Windows 98
Windows NT
Windows 2000
Windows XP
Windows 7


Configures system devices.

Printer port: MODE LPTn[:] [COLS=c] [LINES=l] [RETRY=r]
Serial port: MODE COMm[:] [BAUD=b] [PARITY=p] [DATA=d] [STOP=s] [RETRY=r]
Device Status: MODE [device] [/STATUS]
Redirect printing: MODE LPTn[:]=COMm[:]
Prepare code page: MODE device CP PREPARE=((yyy[...]) [drive:][path]filename)
Select code page: MODE device CP SELECT=yyy
Refresh code page: MODE device CP REFRESH
Code page status: MODE device CP [/STATUS]
Display mode: MODE [display-adapter][,n]
Typematic rate: MODE CON[:] [RATE=r DELAY=d]


MODE COM1:9600,N,8,1,P

Set communications port COM1 to 9600 Baud, with no parity, 8 databits, 1 Stop Bit, and with XON/XOFF (These are the default settings). For those who are using Windows 95, Windows 98, or Windows NT, it is recommend not to configure your communication port this way and instead configure it the appropriate way depending upon the operating system.


Change the output video settings for the directory structure in DOS to 80 columns by 50 lines. When receiving error Invalid parameter - x where x is the invalid parameter the lines or cols specified is invalid setting.


Typing mode alone would display the current mode settings for all the ports, similar to the below output.

Status for device CON:
Lines: 300
Columns: 80
Keyboard rate: 31
Keyboard delay: 1
Code page: 437

Additional information

Reference Question
CH000245 Configuring a modem in MS-DOS.

Additional information

  • See our mode definition for further information and related links on this term.