Command Prompt is a neat command-line interpreter that comes in-built with the Windows operating system. Command prompt is still used for performing various functions such as, collecting information on the network state of the computer, troubleshooting the system, deleting files, formatting computers, etc.
Customizing the Command Prompt according to your needs may end up resulting in your productivity and if you are a young learner who started learning about Command Prompt recently, you will want to check this out! First, it’s important to know for reference how a default Command Prompt terminal looks like, it looks something like this:
Here, we are going to change the color text and also the background color of cmd. Assume 2 variable x & y which are associated with specific colors.
‘x‘ represents the color of the Terminal’s background, whereas,
‘y‘ represents the color of the font on the Command Prompt Terminal.
Following the HEX values of the colors supported by Command Prompt:
0 = Black 8 = Gray 1 = Blue 9 = Light Blue 2 = Green A = Light Green 3 = Aqua B = Light Aqua 4 = Red C = Light Red 5 = Purple D = Light Purple 6 = Yellow E = Light Yellow 7 = White F = Bright White
Example 1: Suppose we want a white background, so after referring to the color table above we will type, ‘f’ in place of ‘x’. Similarly, if we want a light purple colored font, we will type ‘d’ in place of ‘y’.
(x & y are the variables we had assumed earlier).
Example 2: ‘0’ specifies the black color attribute, and since its typed at the place of ‘x’ i.e. it will be applied to background. ‘a’ specifies the light green color attribute, and since its typed at the place of ‘y’ i.e light green attribute will be applied to the font color.
Note: To get all the related information on using color command in Command Prompt you can use the following command
- How to find time taken by a command/program on Linux Shell?
- Useful CMD commands for daily use in Windows OS
- 'dd' command in Linux
- 'IPCS' command in Linux with examples
- Uninstall Linux completely from a PC with Windows
- Zip files in Windows
- IDE for Python programming on Windows
- How to mount windows drives in Ubuntu
- Setup GitLab Repository On Windows 10
- How To Use Bash Shell Natively On Windows 10
- Windows Server 2012 R2 Stuck at "Updating Your System”
- Creating a Dual Boot System with Linux and Windows
- How to change login screen background in Ubuntu
- Autorun a Python script on windows startup
- How to create a Folder without any name and icon in Windows OS?
- How to Download YouTube Videos in Linux Command Line?
- How to use Emojis in Windows 10?
- How to Create and Configure Wi-Fi Hotspot in Windows 10?
- How to Create a Bootable Pendrive using cmd(command-prompt)?
- Whitespaces Before Any Command in Linux
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.