Getting Started

If you are a beginner, introduce the command line

Computers are great because using a mouse or touch device, we can do a lot of work without having to use the keyboard to enter emails, blog posts, or reports.

Long ago, this did not exist. You can only use the keyboard to access the computer and type in weird and secret messages called commands in the terminal.

This is correct when the computer is as big as an entire room, but also when the first personal computers start to become affordable and they will start with the BASIC command prompt.

Nowadays, it is so hidden that consumers have never used it before, and we can still use computers in this way.

We can useterminal.

macOS comes with an application called Terminal, the name of the application is appropriate.

Microsoft provides a program calledWindows terminal.

Linux users know their terminals very well.

The terminal is not just for programmers. This is essential for every professional computer user, because it can unlock work that the GUI (graphical user interface) cannot do for you.

Oh, I mentioned the GUI. The abbreviation for terminal is CLI (Command Line Interface).

There is not only a terminal. you hope to. Instead, we have many different terminal interfaces calledCannonball.

We haveThump, ZSH, fish shell, CSH, etc. But the most popular are Bash and ZSH.

Bash is usually the default, and until recently it was the default macOS Shell, but now it has been changed to ZSH.

Honestly, my favorite shell isFish shell. I like it very much because it is simple, straightforward, with excellent default settings and web-based configuration. I didn't have time to spend time manually configuring my shell prompts and colors, and when it worked out of the box, I accepted.

The terminal is also how you access the networkserver. You can create a VPS server on Amazon or DigitalOcean or wherever you need it, and you can access it using SSH (a secure protocol that connects to a remote shell).

You can use the shell locally, but you can actually connect to a server on the other side of the globe, which is pretty cool. If the connection is a bit lagging, except for some delay.

This is my macOS shell:

I can enter the following to list all files in the main folderlsThen press Enter:

I can change the current working directory to another folder usingcdcommand:

Whenever I don’t know how to use a command, I typeman <command>Get the manual:

This is a man page. Although I find that the man page contains too much information, this is 1 of 14 explanation screens.lscommand.

In most cases, I use this website calledtldr page:https://tldr.sh/. This is the command you installed, and then run it as follows:tldr <command>

It provides me with some useful options only through examples.

Anyway, I am digressing. When typing a command, you can use the left and right arrows to move the cursor.

Some systems also allow you to use the mouse to go to a specific location in the row. For example, on macOS, I can use Option-click to position the cursor wherever I want.

Pressing the up arrow will display the last command you typed. Very good when typing, no need to re-enter everything.

If you type a command that is not found, the shell will tell you:

I have written some tutorials on using Shell:

If you want to read a lot!

Download mine for freeLinux Command Manual


More cli tutorials: