There are several different command lines that you might be referring to when you’re talking about Command Prompt. They’re all related, but they each work and look slightly different.
The Windows Command Prompt is perhaps the most basic command line type and is often referred to as “Command Prompt” or “cmd.” It can be accessed via the Start menu in all recent versions of Windows. If you know how to use Command Prompt on one Windows PC, it’s pretty easy to learn how to use it on another.
Command Prompt is mainly used by experienced system administrators, developers, and people who want to try advanced keyboard shortcuts (like copy and paste). But ordinary users who wish to do some basic tasks can also find using Cmd useful sometimes, for example, when trying to delete a stubborn file or fix a problem with their computer.
The other types of command lines often reference Command Prompt or cmd: the power users version of Microsoft’s operating system that’s accessible from within an administrator mode session called Windows PowerShell or PowerShell for short (the one with blue-green interface), and the built-in Unix environment called Ubuntu on Windows that was added in newer versions of Windows 10. Both Administrator: Command Prompt (formerly known as cmd.exe) and PowerShell run in administrator mode by default. In contrast, Ubuntu runs from a virtual machine environment whose actions are isolated from everything else on your PC.
What is a Terminal?
Terminal or command Line or Command Prompt in Windows or Shell represents a command-line interpreter, an environment that accepts text input and provides text-based output. Programmers and administrators use the Terminal to execute entered commands and perform administrative functions. Usually terminal can be used to troubleshoot and solve PC issues in a fast way.
To run Terminal in Windows, you need to Press Windows+R to open the “Run” box and then Type the “cmd” command to open a regular Command Prompt.
To run Terminal in Linux, you must go to Applications, Accessories, and Terminal. See the image below:
Now that you know to open the Terminal, the next thing you need to learn to open files in the Terminal:
How to Open a File in Terminal?
In Linux Terminal, you can open a file using the command “open” and then put the full path to the file, file name, and file extension. For example, to open a jpg image in the folder “Pictures,” you need to type:
Additionally, if you want to open file in Linux Terminal and define an application, in that case, you can use the command “open -a “QuickTime Player” ~/Folder/some filename.extension.
open -a "QuickTime Player" ~/Videos/video.mp4
You can go even further and define two paths, one for an app that needs to open the file and one path for the file, such as:
open -a /some_path/application.app /some_path/file.mp4
If you need a command to open the URL you need to use:
How to Open a File in Windows Terminal – Command Prompt?
To open a file in the command prompt, you must find the directory using the CD command and then type the filename. Extension. For example:
See how I can open the Power.jpg file from the Combine directory on my PC: