How do I run Emacs in command prompt?

You’d run the following command in a Command Prompt window: bash -c “sudo apt-get install emacs”. When you use bash -c, Windows will launch a Bash shell in the background and pass the command to it. The command will run until it’s done and then quit, along with the Bash shell.
For More Information Please Refer:

You May Also Like to Read: