How to create the matrix rain in command prompt

Who could forget the 1999 movie The Matrix? And Everybody loves the visual effect of the falling binary code known as ” Rain ” in The Matrix. In this article we’ll relive all Matrix memories.

Now we’ll turn our command prompt into something that looks like it just came out of the matrix movie, or maybe something that looks like straight out of a hacker’s system and of course, with this knowledge you will rise to elite hacker status.

Joking aside, “The Matrix Rain Effect” that you can easily make and show off to your friends, It is inspired by the matrix movie, this is known as falling code trick and it’s extremely popular on social networking websites.

Steps To Create A Matrix Rain In Command Prompt

Follow the steps to create an matrix cmd with notepad.

2- write following code in it or just download the zip file at the end of the page (password:ceofix) and Unzip it. Then simply double-click Matrix.bat file)

3- Click “File” and then use save as menu , a .bat file has been created which is executable. ( example: “Matrix.bat”.)

3. Now, double-click it. after running cmd , screen will be appear like following picture. That’s all. Enjoy the Matrix effects appearing on your screen.

Tips: Assign different values to the color, and have fun. The numbers is the background color, and the letters is the text color.

0 – Black
1 – Blue
2 – Green
3 – Aqua
4 – Red
5 – Purple
6 – Yellow
7 – White
8 – Gray
9 – Light Blue

A – Light Green
B – Light Aqua
C – Light Red
D – Light Purple
E – Light Yellow
F – Bright White

If you are always looking to amaze your friends by doing some tricks with your computer or anything else then this guide is for you. You must have seen on of a much hit movie of all times “The Matrix” and you have seen matrix of green color in that movie which looks like a very high tech stuff basically it isn’t. You can do this by yourself simple by writing few lines of code in notepad and by following step by step guide, that how you can create a matrix using notepad and command prompt.

Others are Reading

  • Androids Sells More But Developers Still Prefer IOS
  • How to Run Windows Defender


    font-size: 13px !important;color: #474747;text-align: justify;line-height: 21px;” >

Go to “Start Menu” and then go to “All Programs”.

Click on “Accessories” and then click on “Notepad” to open it.

Write following lines of code in your notepad window.

@echo off
Color 0a
echo ” – ” ” – ” ” – ” ” – ” ” – ” ” – ” ” – ” ” – ” ” – ” ” – ” ” – ” ” – ” ” – ” ” – ” ” – ” ” – ” ” – ” ” – ” ” – ” ” – ” ” – ” ” – ” ” – ” ” – ” ” – ” ” – ” ” – ” ” – ” ” – ” ” – ” ” – ” ” – ” ” – ” ” – ” ” – ” ” – ” ” – ” ” – ” ” – ” ” – ” ” – ” ” – ” ” – ” ” – ” ” – ”
echo %randoom% %randoom% %randoom% %randoom% %randoom% %randoom% %randoom% %randoom% %randoom% %randoom%
ping –n 0.25 500.0.0.1>Null
goto X

Click “File” on top left corner of notepad window and then click on “Save as” and save the file in “.bat ” extension e.g. mymatrix.bat.

Execute the file from where you saved it.

Now you will be able to see a matrix in a new command prompt window.

To exit the program, simply hit Ctrl+Break and then press the Enter key and then press Y to confirm the action.

Looking for a way to create the matrix effect in python then you are at the right place, today in this python tutorial I will show you how to create a matrix effect in python programming with code so read till the end.

The matrix effect is just a bunch of 0 and 1 numbers printing in the terminal. It is also called the matrix rain effect. It will be a fun and interesting program.

If you are a beginner to python then don’t worry, I will show you step by step how to create the matrix rain effect in python and also provide you with the matrix rain code in python.

Matrix Effect Python Code

Above is the matrix effect python code. First create a new folder on your computer for this project, open it in a code editor of your choice, create a python file and copy and paste the above python code in your file.

We have not used any external libraries for this project, so you don’t have to install anything. Now to run it you can use an online python compiler or run it on your computer.

I will recommend you to run it on your computer because it does not show the color in the online python compiler.

Don’t have python installed on your computer, you can refer to this guide to install python: Install and setup python on computer.

To run the program, open a command prompt or terminal at your project folder location and paste the above command to start the program.

The program will start and you will see that the console text is green and it goes on printing 0 and 1 creating a matrix effect, below is an example output of this program.

As you can see, we have successfully created the matrix effect in python programming. I hope you were able to run this program successfully.

Matrix Effect in Python Explanation

We have seen how to create a matrix effect using python in code. Now let’s see and understand how this python code work.

First we import the required modules for this project which are installed with python setup so you don’t have to install them manually. Let’s see what each module does:

  • os – It provides methods to interact with the operating system.
  • time – You can use this to handle time related tasks.
  • random – You can use this to generate random numbers.

Above are the only modules we need for this program, and now you know why we need them.

Then we have these 2 lines of code. The first line is responsible to change the command prompt or terminal text to green.

Second line is a list with 1 and 0. These are the numbers which we want in the matrix effect. You can add any other number you want to add in the matrix effect.

Now we have a while loop which will run till tm variable is 30 inside the while loop. We print the matrix of 1 and 0 by using the below line.

This line chooses a random number from the nums list and adds random space to it and prints it. You can first test it with just one statement; it will not cover the whole space in the terminal.

So I have printed it multiple times so it covers the whole area of the terminal, making it look like a matrix effect.

As you can see from the above code we increment the tm variable by 0.1, so the loop does not run infinitely, it will stop when it reaches 30.

Lastly, we use the time.sleep() function which pauses the program for 0.1 seconds which makes the matrix effect look more real.


This was the tutorial on how to create a matrix effect using python programming. I hope you found this tutorial helpful and useful. Do share it with your friends who might be interested in this python program.

Here are some more python guides you might find helpful:

I hope you found what you were looking for from this tutorial. If you want more python tutorials like this, then do join our Telegram channel for future updates.

I want to run the Matrix.bat CMD with a different color on each line to make a rainbow effect. Here is the Matrix.bat

I have tried experimenting myself but have not succeeded with my low level experience. Here is where I got with my experimentation.

When I tried this it changed the whole command prompts color instead of the individual lines of %random%. Hopefully someone more experienced can give me some pointers on how to do this.

2 Answers 2

You can now choose to sort by Trending, which boosts votes that have happened recently, helping to surface more up-to-date answers.

Trending is based off of the highest score sort and falls back to it if no posts are trending.

With Ansi escape codes, rapid, smooth and EASY rainbow (or other) matrix’s can be achieved.

This linked code can alternate between the following outputs, with a very simple process to incorperate new output styles. I’ve remarked throughout the code what’s being done and how / why.

the default: Smooth transitioning color changes (Waterfall like)

Rapid Chaotic color from one character to the next. flow is still smooth.

The matrix animation occurs in this code block:

The loop updates variables for cursor X and Y positions, the Character to be printed and the color to print it in using Random number Generation to access arrays for each non X Y value. Once those values are updated, they are expanded as arguments to the following Macro to action the ANSI codes changing position and color with the Echo command.

Inclusion of the ^&^&Endlocal after performing the echo command is integral to preventing the setlocal recursion threshold being exceeded. Escaping the Ampersands prevent the Endlocal from destroying the macro during definition.

The choice to use a macro to conduct the processing of arguments makes this script both smooth and Insanely Fast.

A variant modified to use character mapping through substring modification and random string lengths. The below variant also uses a method of assigning the ASCII 27 escape code to a variable, without requiring the actual ASCII 27 character.

Everybody loves the visual effect of the falling binary code known as ” Rain ” in The Matrix. In this article, we gonna show you an easy way to create The Matrix rain in your Command Prompt.

Steps To Create A Matrix Rain In Command Prompt

Step 1: Open Notepad.

Step 2: Copy and paste the below code in your notepad

Step 3: Click on ” File ” and then ” Save As ” option. Save your file with a ” .bat ” extension i.e ” OnlineCmag.bat “.

Step 4: Run that batch file as an administrator.

How To Create Your Own Computer Clock Using Notepad

Today we are going to show you an interesting notepad trick which lets you create your own computer clock with date and time. You can customize the PC clock

To enlarge The Screen

Step 5: Right-click on the command prompt and Click on the properties.

Step 6: Click on the Layout tab.

Step 7: Click On the window size section and enter your required resolution.

Step 8: To apply changes Click on ok.

Ghost keyboard Typing | Make Your Notepad type Automatically

Today we are going to show you a Cool Notepad Trick ( Prank ) ever. Mostly people use their notepad to type and save the information, Ghost keyboard Typing

To Stop The Matrix Rain:

Just press CTRL + C, Then you will be asked: ” whether to terminate the job “. Now type ” y ” to stop the program.

Tips :

You can even add colors to your command prompt background and text. This is just by changing color codes i.e if you use “color A2” or “color 2A” then you will have a light green text on a green background.You may use any combination between 0 to 9 and A to F to change your background and Text colors.

Easy Way To Create A Memory Eating Virus – Just For The Fun Of It

We are going to teach you the easiest way of creating a virus. In this process to create a virus that eats up the computer memory i.e Memory Eating virus

To See All The Articles On Notepad Tricks Click Here. We Are Sure You Will Be Amazed.

The command line is usually thought of as serious and we usually only cover useful terminal tricks that are fairly advanced, but not everything in the Terminal has to be useful. To prove that, we have three command strings that when pasted into the OS X Terminal, do nothing but scroll screenfuls of random text, binary, or your very own custom message, making your terminal window look a bit like the computer screens from the 1999 movie The Matrix.

For the best looking (i.e. geekiest) results, at least change your Terminal UI settings so that the active window is styled as “Homebrew” or “Pro”, which uses green text against a black background. Or go all out and get a really fancy terminal appearance. Take the Terminal full-screen first if you’d rather have the scrolling Matrix-lookalike take up the entire screen.

Turn the Terminal into a Scrolling Screen of Matrix-Style Gibberish

  • Open Terminal, found in /Applications/Utilities/ or found through Spotlight or Launchpad
  • Copy and paste the following text into the command line prompt:

LC_ALL=C tr -c “[:digit:]” ” “

  • When finished, hit Control+C to end the process, or just close the Terminal window
  • If you can’t test this yourself or you’re just wondering what it looks like without running it, here is a very short video of what it looks like. The video shows it scrolling choppy but it’s actually really smooth:

    Plan on using this often for something or other? Make it an alias by tossing the following into your .bash_profile:

    alias matrix=’LC_ALL=C tr -c “[:digit:]” ” “

    Or alias the binary command below instead:

    Scrolling Endless Binary in the Terminal

    If Matrix-style gibberish isn’t your thing, you can use the following completely different command string to have the Terminal barf out a giant stream of binary instead:

    echo -e “1”; while $t; do for i in `seq 1 30`;do r=”$[($RANDOM % 2)]”;h=”$[($RANDOM % 4)]”;if [ $h -eq 1 ]; then v=”0 $r”;else v=”1 $r”;fi;v2=”$v2 $v”;done;echo -e $v2;v2=””;done;

    Just as before, you can cease the binary scrolling by hitting Control+C or closing the Terminal window. Here’s what the binary scrolling looks like:

    Admittedly this is pretty pointless but it’s fun, so whether you’re just making your very own DIY terminal-based screen saver, just like the look, or if you want to look super busy doing something amazingly complex when your boss is hovering, have at it.

    Repeatedly Scroll Anything in the Terminal

    Want to customize what’s being scrolled? Use the following command string instead, replacing the area in quotes with anything:

    while (true) do echo -n “9A85Y1BF978124871248172487124871248712487124”; done

    For example, you could endlessly scroll “ is the most awesome, amazing, and handsome website” with the following:

    while (true) do echo -n “ is the most awesome, amazing, and handsome website “; done

    As usual, Control+C ceases the scrolling.

    Thanks to Pete for sending in these modified versions of commands

    Latest commit

    Git stats


    Failed to load latest commit information.

    Matrix like effect in your terminal

    • Overview
    • Build Dependencies
    • Building and Installation
      • Using configure (recommended)
      • Using CMake
    • Usage
    • Captures
      • Screenshots
      • Screencasts
    • Maintainer
      • Contributors
    • Contribution Guide
    • License

    CMatrix is based on the screensaver from The Matrix website. It shows text flying in and out in a terminal like as seen in “The Matrix” movie. It can scroll lines all at the same rate or asynchronously and at a user-defined speed.

    CMAtrix is inspired from ‘The Matrix’ movie. If you haven’t seen this movie and you are a fan of computers or sci-fi in general, go see this movie.

    ❕ Disclaimer : We are in no way affiliated in any way with the movie “The Matrix”, “Warner Bros” nor any of its affiliates in any way, just fans.

    You’ll probably need a decent ncurses library to get this to work. On Windows, using mingw-w64-ncurses is recommended (PDCurses will also work, but it does not support colors or bold text).

    Run this command to check the version of ncurses.

    If you get no output then you need to install ncurses. Click below to install ncurses in Linux.

    💾 Building and installing cmatrix

    To install cmatrix, Clone this repo in your local system and use either of the following methods from within the cmatrix directory.

    🔹 Using configure (recommended for most linux/mingw users)

    Here we also show an out-of-source build in the sub directory “build”. (Doesn’t work on Windows, for now).

    After you have installed cmatrix just type the command cmatrix to run it 🙂

    Run with different arguments to get different effects.

    For more options and help run cmatrix -h
    Read Manual Page by running command man cmatrix

    To get the program to look most like the movie, use cmatrix -lba To get the program to look most like the Win/Mac screensaver, use cmatrix -ol

    📍 Note: cmatrix is probably not particularly portable or efficient, but it wont hog too much CPU time.

    • Chris Allegretta[email protected] for writing cmatrix up in a fortnight and giving us the responsibility to further improve it.
    • Krisjon Hanson and Bjoern Ganslandt for helping with bold support and Bjoern again for the cursor removal code, helping with the -u and -l modes/flags, and Makefile improvements.
    • Adam Gurno for multi-color support.
    • Garrick West for debian consolefont dir support.
    • Nemo for design thoughts and continuous help and support.
    • John Donahue for helping with transparent term support
    • Ben Esacove for Redhat 6 compatibility w/matrix.psf.gz
    • jwz for the xmatrix module to xscreensaver at
    • Chris Allegretta’s girlfriend Amy for not killing him when he stayed up till 3 AM writing code.
    • Sumit Kumar Soni for beautifying the README.
    • The makers of the Matrix for one kickass movie!
    • ➤ Everyone who has sent (and who will send) us and Chris mails regarding bugs, comments, patches or just a simple hello.
    • ➤ Everyone who has contributed to the project by opening issues and PRs on the github repository.

    If you have any suggestions/flames/patches to send, please feel free to

    • Open issues and if possible label them, so that it is easy to categorise features, bugs etc.
    • If you solved some problems or made some valuable changes, Please open a Pull Request on Github.
    • See for more details.

    This software is provided under the GNU GPL v3. View License

    New empire of knowledge

    • 26/04/2021
    • Anna Kim
    • Blog

    How do I run a matrix in Command Prompt?

    Command Prompt Matrix NUMBERS

    1. Step 1: What Technology Do I Need? You need:
    2. Step 2: The Code. Ok, to enter the code, you have to open the Notepad.
    3. Step 3: Save It As . bat.
    4. Step 4: Open It and Let It Run. Open it on your desktop and let it run.
    5. Step 5: Making Screen Bigger.
    6. 11 People Made This Project!
    7. 88 Comments.

    How do I make Command Prompt matrix full screen?

    Today I will show you how to make a full screen batch matrix.

    1. Step 1: How to Begin. First open notepad.exe you can type it into the search bar or rght click and select new then new text document open it and type the following code ( @echo off to goto top)
    2. Step 2: Full Screen.
    3. Step 3: Extra.

    How do you make a matrix bat?

    How to Make a Matrix Batch File

    1. Step 1: Creating the Batch File. 2 More Images. right click.
    2. Step 2: Programing the File. right click. >edit.
    3. Step 3: Additional Creativity to Your Matrix. you can change the color code to make the background and numbers a different color.

    How do you do matrix text?

    How to Make a “Matrix” Effect on Notepad (Windows Only)

    1. Step 1: Open Notepad. Like the tittle says, open Notepad.
    2. Step 2: Copy and Paste. Copy and paste this into Notepad: @echo off. color 02.
    3. Step 3: Save It. save the file as “NameGoesHere. bat” no qoutes.
    4. Step 4: Run It. Run it and, Enjoy.
    5. 1 Person Made This Project!

    How do you make a matrix diagram?

    How to build matrix diagrams

    1. Define your purpose.
    2. Recruit your team.
    3. Identify and collect the data sets.
    4. Select the appropriate matrix type.
    5. Determine how to compare your data.
    6. Document the matrix relationships.
    7. Review and draw conclusions.

    What is CMD stand for?

    Acronym Definition
    CMD Command (File Name Extension)
    CMD Command Prompt (Microsoft Windows)
    CMD Command
    CMD Carbon Monoxide Detector

    What are some cool CMD tricks?

    Best Command Prompt Tricks (2021)

    • Encrypt Files Using Command Prompt.
    • Change the Color of the Command Prompt Window.
    • Change the Prompt Text in Command Prompt.
    • Change the Title of the Command Prompt Window.
    • List Every Driver Installed on Your Windows 10 PC.
    • F1 to F9 Keys are Shortcuts in CMD.
    • Hide Folders using Command Prompt.

    What is commmand PROMT format C?

    Successfully format C drive using Command Prompt (Windows Setup CD required) Insert Windows installation media into the (Windows 10/8/7) computer and enter BIOS to set computer boot from it. In the pop-up window, select “Language to install”, “Time and currency format” and “Keyboard or input method”. On the next window, click “Repair your computer” from the lower-left corner.

    What is matrix command?

    The Command Matrix (コマンドマトリックス, Komando Matorikkusu) is the command system in Kingdom Hearts Re:coded. Before deck commands can be used in battle and in the field, they need to be installed in the Command Matrix.

    What is control prompt?

    Prompt Control Definition (PMTCTL) The Prompt Control (PMTCTL) statement specifies a condition that is tested to determine whether prompting is done for the parameters whose PARM statement referred to this PMTCTL statement.


    • Home
    • Archives
    • Contact Me
    • About

    Tuesday, 14 June 2011

    Matrix Code Effect In Command Prompt

    Matrix is a 1999 science fiction-action film written and directed by Larry and Andy Wachowski. The film depicts a future in which reality as perceived by most humans is actually a simulated reality created by sentient machines to pacify and subdue the human population, while their bodies’ heat and electrical activity are used as an energy source.

    Matrix wallpapers and Matrix effects are even popular today. When we hear the word ‘matrix’ first thing that come into our mind will be the green matrix effect.Here, I am going to show “How to make an matrix code effect in an command prompt”

    • Open the Notepad and just type/copy anyone of the below matrix code effect and save it as matrix.bat
    • Now open that matrix.bat file you will get an matrix effect in command prompt

    Matrix Code Effect -I
    title Hacker’s Lodge Matrix Re-Reloaded
    color 2
    echo 3 2 3 4 6 8 4 2 3 9 7 3 4 9 7 5 3 1 7 9 1 0 9 2 4 6 2 1 3 4 5 3 5 2 1 0 3 6
    echo 2 5 5 6 4 7 1 8 6 8 6 0 8 6 4 1 5 6 4 6 8 8 0 3 1 4 6 8 4 7 8 6 2 1 5 7
    echo 5 8 9 2 3 6 8 7 1 2 5 3 6 5 4 2 0 8 9 4 0 3 7 4 2 2 8 9 2 0 1 5 6 5 8
    echo 5 9 6 8 4 6 8 4 6 8 4 2 6 4 6 8 1 6 6 8 1 0 6 8 1 6 8 1 6 1 6 5 4 5 6 9 8 7
    echo 6 5 1 6 6 0 6 4 6 1 6 5 1 7 5 3 8 5 1 6 5 1 6 0 1 6 0 4 3 4 1 2 4 0 4 3 2
    goto A
    goto B
    goto C

    Matrix Code Effect -II
    title Hacker’s Lodge Matrix Re-Reloaded
    color 2
    dir /S /W /L /D /Q /R

    Matrix Code Effect -III
    title Hacker’s Lodge Matrix Re-Reloaded
    @echo off
    color 2
    echo %random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%
    goto top

    Command Prompt is one of the most powerful tools in Windows; but sadly, it is also the most ignored one. Things were not always like this; but with the advent of GUI based operating systems, people started feeling that computing through command based tools was boring. This ultimately led the command prompt into obscurity.

    However, the command prompt is not useless. In fact, it can be pretty useful. This article provides some excellent tricks, secrets and hacks that will make you realize that the Windows Command Prompt is not only useful but also a tool that you should definitely give more respect to.

    1-Watch ASCII version of the Star Wars Episode IV movie
    Surprised yet? You can watch an ASCII version of the full Star Wars Episode IV Movie right in your command prompt window. Just open command prompt, type a small code and the movie will start playing immediately. Read the complete instructions here.

    2- Create Matrix falling code effect
    Have you watched “The Matrix”? Of course, you have. Then, you already know what I am talking about. In case you still don’t know what I mean, take a look at this image! You can create the same effect in command prompt using just a few lines of code. Head over to this post for instructions.

    3- Make Folders that you cannot delete
    Are you tired of accidentally deleting important folders? Well, if you are, you can learn how to make undeletable folders here.

    4- Shutdown your computer giving a funny reason
    What if your computer shuts down saying that it is tired and doesn’t want to work anymore? It would be fun, wouldn’t it? You can do so by reading the instructions here.

    5- Know your IP address, DNS Server’s address and a lot more about your Internet Connection
    Command Prompt can even let you know your IP address. Just type ipconfig/ all in the command prompt and press Enter. Along with your IP address and DNS servers, command prompt will also return a ton of information like your host name, primary DNS suffix, node type, whether IP Routing ,Wins Proxy, and DHCP are enabled, your network adapter’s description, your physical (MAC) address etc .

    6- Know if your neighbours are stealing your WiFi connection

    Command Prompt can let you know if someone is connected to your Local Area Connection and using it. Just follow the steps:-
    1) Open your browser and visit or depending on your router.
    2) Find the tab that mentions “Attached Devices” or something similar.
    3) Find the computer name, IP address and MAC Address (sometimes called Physical Address or Hardware Address) of your computer using the previous trick.
    4 )Compare it with those displayed by your router in Step 2. If you notice some strange devices, then your neighbour has been sneaking in on your internet connection and it is best to add a password.

    7- Know if someone is hacking your computer/ Trace a Hacker

    Want to know if someone is hacking your computer? Command Prompt can help you find if someone you don’t know is connected to your computer stealing private data. Just execute netstat -a and the command prompt will return a list of computers that your computer is connected to. In the results returned, Proto column gives the type of data transmission taking place (TCP or UDP) , Local address column gives the port with which your computer is connected to an external computer and the Foreign Address column gives the external computer you are connected to along with the port being used for the connection. State gives the state of the connection (whether a connection is actually established, or waiting for transmission or is “Timed Out”).

    These tricks work on Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Vista, Windows XP and all previous versions of Windows.

    Now you know just how useful command prompt can be. Find more awesome tips and tricks in the Tricks section.