UP | HOME

Marcus Santos

Emacs & Lisp enthusiast

Getting Started with the Terminal
Published on Sep 12, 2023 by Marcus Santos.

Introduction

The Terminal is a powerful tool that allows you to interact with your system using text-based commands. Linux, Mac, and Windows allow you to use the Terminal. In this tutorial, we’ll cover the basics of opening the terminal, understanding the command line, and executing commands.

Opening the Terminal (in Ubuntu Linux)

  • If you are using a Mac or a Windows computer, ask ChatGPT how to open the Terminal
  • To open the Terminal in Linux, press Ctrl + Alt + T on your keyboard. Alternatively, you can click on the “Activities” button in the top-left corner of your screen, type “Terminal” in the search bar, and press Enter.

Understanding the Command Line

  • The Terminal provides a text-based interface to interact with your computer.
  • It displays a prompt, usually showing your username and the name of your computer, followed by a $ symbol. This is where you’ll type your commands.
  • The command line is case-sensitive, so “command” and “Command” are treated as different commands.

Executing Commands

  • To execute a command, type it at the command prompt and press Enter.
  • For example, you can type ls (short for “list”) and press Enter to see a list of files and folders in your current directory.
  • You can also provide options to commands. For example, ls -al displays a detailed list with that includes the hidden files and file permissions and sizes.

Navigating Directories

  • To navigate between directories, you can use the `cd` (change directory) command.
  • For example, `cd Documents` will move you to the “Documents” directory if it exists in your current location.

Getting Help

  • If you’re unsure about how to use a command or need more information, ask ChatGPT how a particular command works, or how to do a particular thing in the command line. For example, below is my Q&A with ChatGPT:

    Q: what are hidden files in linux, in simple terms?
    A: Hidden files in Linux are files that are not normally shown in file listings or
       graphical file browsers. They have names starting with a dot (.) and are typically
       used for storing configuration and settings information for programs and your system.
       They are "hidden" to reduce clutter but can be viewed and edited when needed.
    Q: How can I list the contents of my current folder so it shows all hidden files?
    A: To list the contents of your current folder, including all hidden files,
       you can use the 'ls -al' command in the Linux terminal.
    

Exiting the Terminal

  • To exit the Terminal, you can type `exit` and press Enter, or simply close the Terminal window.

Conclusion

The Terminal is a powerful tool for working with Ubuntu Linux. By following this tutorial, you’ve learned how to open the Terminal, understand the command line, and execute basic commands. As you become more familiar with the Terminal, you’ll be able to perform a wide range of tasks efficiently and confidently.