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.

  • Availability

  • Mode syntax

  • Mode examples

  • Additional information

  • 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.

  • Windows 10 and Windows 11 syntax
  • Windows Vista, 7, and 8 syntax
  • Windows XP and earlier syntax

Windows Vista, 7, and 8 syntax

Windows XP and earlier syntax

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: 300Columns: 80Keyboard rate: 31Keyboard delay: 1Code page: 437

Additional information

  • How to configure a modem in MS-DOS.
  • See our mode definition for further information and related links on this term.