Mode command
The mode command is used to view or modify a port or display setting.
Availability
Mode is an external command available for the following Microsoft operating systems as mode.com.
- All Versions of MS-DOS
- Windows 95
- Windows 98
- Windows NT
- Windows 2000
- Windows XP
- Windows 7
- Windows 8
- Windows 10
- Windows 11
Mode syntax
Windows 10 and Windows 11 syntax
Configures system devices.
Serial port: | MODE COMm[:] [BAUD=b] [PARITY=p] [DATA=d] [STOP=s] [to=on|off] [xon=on|off] [odsr=on|off] [octs=on|off] [dtr=on|off|hs] [rts=on|off|hs|tg] [idsr=on|off] |
Device Status: | MODE [device] [/STATUS] |
Redirect printing: | MODE LPTn[:]=COMm[:] |
Select code page: | MODE CON[:] CP SELECT=yyy |
Code page status: | MODE CON[:] CP [/STATUS] |
Display mode: | MODE MODE CON[:] [COLS=c] [LINES=n] |
Typematic rate: | MODE CON[:] [RATE=r DELAY=d] |
Windows Vista, 7, and 8 syntax
Configures system devices.
Serial port: | MODE COMm[:] [BAUD=b] [PARITY=p] [DATA=d] [STOP=s] [RETRY=r] |
Device Status: | MODE [device] [/STATUS] |
Redirect printing: | MODE LPTn[:]=COMm[:] |
Select code page: | MODE device CP SELECT=yyy |
Code page status: | MODE device CP [/STATUS] |
Display mode: | MODE [display-adapter][,n] MODE CON[:] [COLS=c] [LINES=n] |
Typematic rate: | MODE CON[:] [RATE=r DELAY=d] |
Windows XP and earlier syntax
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]file name) |
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] MODE CON[:] [COLS=c] [LINES=n] |
Typematic rate: | MODE CON[:] [RATE=r DELAY=d] |
Mode examples
MODE COM1:9600,N,8,1,P
Set communications port COM1 to 9600 Baud, with no parity, 8 data bits, 1 stop bit, and with XON/XOFF (these are the default settings). For those using Windows 95, Windows 98, Windows NT, or later we suggest modifying the ports through Device Manager.
MODE CON: COLS=80 LINES=50
Change the output video settings for the directory structure in DOS to 80 columns by 50 lines. If the lines or cols values are invalid, you will receive the error "Invalid parameter - x," where x is the invalid parameter.
MODE
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