Commands

In Linux, a command is an instruction given to the computer to perform an action. These commands are typed in a terminal, a tool that allows direct interaction with the operating system via command line (without a graphical interface).

https://bellard.org/jslinux/vm.html?url=alpine-x86.cfg&mem=192

A command often consists of three parts:

  1. The command name: This corresponds to the action to execute, for example:
    • ls: to list files and folders.
    • cd: to change directory.
    • mkdir: to create a new folder.
  2. Options (optional): They modify the command's behavior. For example:
    • ls -l: displays files with additional details like size and modification date.
    • rm -r: deletes a folder and its contents recursively.
  3. Arguments (optional): These are the information on which the command must act. For example:
    • cd Documents: here, "Documents" is the argument that indicates the directory to go to.
    • rm file.txt: "file.txt" is the argument to delete.

Here's a complete example:

ls -l /home
  • ls is the command name.
  • -l is an option to display information as a detailed list.
  • /home is the argument that specifies the directory to display.

Commands are very powerful because they allow quickly performing complex tasks, but they require precision to avoid errors, such as accidentally deleting important files.

For beginners, it's advisable to start with simple commands and consult help using man [command] or command --help to learn how to use them correctly. On some systems, the man command is not installed by default, and it can be installed or you can use the man pages site.