Command-Line Interface: Your Command Center

Ejumegu Victoria
2 min readApr 2, 2022

What is a Command-Line (CLI)?

Are you a aspiring programmer who sees a black screen with white and green gibberish or you just randomly heard your developer friend constant say “CLI”?

Command line interface on your computer that lets you access other applications.
Command-Line Interface (CLI)

If you’re a Nigerian that heard “CLI” for the first time, you might wanna mistake it for “CLO” in youth service which means Corper’s Liaison Officer…lol (ridiculous right?).

Well, my friend, it’s fine. Now a CLI is the yeah true “A black screen with mostly green, red, and white combination of letters and numbers”. CLI stands for Command-Line Interface and it is a black screen or window where you can type commands that your computer will execute for you. It is a command center where we can run and communicate with other applications. It is also referred to as “Terminal”.

How to open the Command Line on your computer?

Windows: Go to your Start menu. Type CMD or Command Prompt and open it. CMD serves as the command line interface in Windows.
Mac: Open your applications and find “Terminal”.
Linux: Open your programs menu and search “Terminal”. Alternatively, press CTRL + ALT + T on your keyboard.

Did you see a $ sign and wondering what it means? It simply means “Hey! In your terminal, type what follows” meaning it is ready to receive commands from you. Lets try this: type “whoami” in the $ and see what it shows you. It is expected to show your username.

Lets go further!
How do you create a file?
The “touch” command allows you to do so.
Start by typing ls on your terminal. ls displays the current directory’s files and folders (or will show nothing if the current directory is empty). In your terminal, type touch test.txt to create a test.txt file. Return to the command prompt and type ls. In the output, you should see test.txt. Using the “touch” command, you can also make many files at once. touch index.html, script.js, and style.css, then hit enter. After that, type ls again. In the output, you should notice the files. This is a short example of how the terminal’s power is revealed.
Voila! Files created.

Now lets create a Directory which is a folder.
Type mkdir followed by the name you want to give the folder. e.g mkdir Medium creates a folder named “Medium”.

Is there a way to open the folder?
Of course. Type cd followed by the folder you want to open. Let's open the folder we created. Type cd Medium and yay! We’re in. Note that your files and folder names are case sensitive else it won’t be recognised. That is, you have to type it the way you saved it.

See you next time. Coding is fun!

--

--

Ejumegu Victoria

Web developer, Blockchain enthusiast, Financial analyst and Active content writer.