Skip to content

MODE Windows Command Guide

The MODE command in Windows allows users to configure system devices, specifically the COM and LPT ports. By using various parameters and options, users can change settings such as baud rate, parity, data bits, and stop bits for serial ports. Additionally, the MODE command can be used to redirect printing outputs to different devices or to enable line delay. This command offers flexibility and customization for managing system devices efficiently.

Terminal window
MODE [device] [baud] [,] [parity] [,] [dataBits] [,] [stopBits] [,] [xon=on|off] [,] [oem] [,] [ansi]
OptionDescription
deviceThe specific device to configure
baudSets the baud rate
paritySets the parity (even, odd, none)
dataBitsSets the number of data bits
stopBitsSets the number of stop bits (1, 2)
xonEnables or disables XON flow control
oemSpecifies if the device is OEM
ansiSpecifies if the device is ANSI

There are no specific parameters for the MODE command.

Set the computer’s current code page to 437

Section titled “Set the computer’s current code page to 437”
Terminal window
mode con cp select=437

Changes the computer’s current code page to 437, which is often used for English language support.

Display current console input/output code pages

Section titled “Display current console input/output code pages”
Terminal window
mode con cp

Shows the current code page settings for console input and output.

Terminal window
mode > output.txt

Redirects the output from the mode command to a file named “output.txt”.

Set the printer to print in landscape orientation

Section titled “Set the printer to print in landscape orientation”
Terminal window
mode lpt1: landscape

Sets the printer connected to LPT1 to print in landscape orientation.

Set the serial port COM1 to use even parity

Section titled “Set the serial port COM1 to use even parity”
Terminal window
mode com1: parity=e

Configures the serial port COM1 to use even parity for data transmission.

Terminal window
mode com2: off

Turns off the serial port COM2 to disable its functionality.

Terminal window
mode

Lists all available printer ports and their current configurations.

To use the mode command in Windows, execute the following command:

Terminal window
mode --option <value>

What are some common options with the mode command?

Section titled “What are some common options with the mode command?”

Some common options with the mode command include setting the COM port communication parameters and setting display mode options.

How do I display the current mode settings in Windows?

Section titled “How do I display the current mode settings in Windows?”

To display the current mode settings in Windows, use the following command:

Terminal window
mode

How do I change the console code page with the mode command?

Section titled “How do I change the console code page with the mode command?”

To change the console code page using the mode command, you can use the following command:

Terminal window
mode CON: CP SELECT=<code_page_number>

Can I use the mode command to switch between text and graphics modes?

Section titled “Can I use the mode command to switch between text and graphics modes?”

Yes, you can use the mode command to switch between text and graphics modes on Windows. Execute the following command to switch between the modes:

Terminal window
mode con: cols=80 lines=25

How do I set the baud rate with the mode command?

Section titled “How do I set the baud rate with the mode command?”

To set the baud rate using the mode command in Windows, you can use the following command:

Terminal window
mode COM1:9600,N,8,1
  • Set or display system configuration
  • Configure serial port communication parameters
  • Configure parallel port settings
  • Display information about device settings
  • Redirect console input and output to a file