We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

Command Line vs. GUI

In other Boot.dev courses you may have run your code by clicking a "Run" button. But as a realâ„¢ developer, you'll likely run your code using a command line interface (CLI) instead. For example, in Python, you would run a Python code file like this:

python main.py

What's a CLI?

You'll often hear the terms "terminal," "shell," "command line," "CLI," and "command prompt" used interchangeably (despite some technical differences) to refer to the same thing: a program that allows you to interact with your computer in a text-based way.

What's a GUI?

If you don't have a technical background, you're probably used to interacting with your phone or computer using a graphical user interface (GUI). When you use a mouse to click on fancy icons, buttons, and menus, you're using a GUI.

Click to play video

To be fair, it's usually easier to teach people to use a GUI than a CLI. You can simply point to things and say "click here" or "drag this there." But GUIs do have some drawbacks:

  • They're weak. You are given much more control over your computer through a CLI. With a GUI you're limited to the options that the developer of the GUI has given you.
  • They're slow. Once you know the commands to type, it's much faster to type them than to click through endless menus with a mouse.
  • They're not as reproducible. If you want to share a set of instructions, you can just copy and paste commands without worrying about screen sizes and user preferences.
  • They're not automatable. It's easy to write code that manipulates text (as you've seen in Python), but it's much harder to write code that manipulates GUIs.
  • They're not as cool. You will be invited to 90% fewer romantic outings if you are a GUI user.

Assignment

In your terminal, run the following command:

whoami

When you're done, answer the question.