The 9 basic Linux commands that every Ubuntu user should know

0
91

Linux has changed a lot in recent years. Gone are the times when it was a system for hackers, complicated to use, and requiring memorizing countless commands to configure them. Today, it is not a more complicated system than Windows or macOS, a perfect option that anyone can install for free on any PC. Of course, if you want to make the most of this system, it is necessary to know at least the most basic terminal commands.

It is true that, today, we can do almost anything in Linux without having to execute a single command: the installation is completely guided, we have a very complete application store, an update manager, a configuration tool, etc. However, there are certain procedures that, although they can be carried out from the interface, are much more comfortable to do by memorizing a simple command.

Next, we tell you what are, from our point of view, the 4 essential Linux commands that every user should know.

APT, the most important command

“apt”, successor to the classic “apt-get”, is one of the tools that every user should know how to use. It is the default package manager for Ubuntu (and most distros), and with it we can from install and update PC programs to search for new versions of our operating system.

It is very simple to use. Simply open a terminal within our Ubuntu, and execute the following commands depending on what we want to do:

  • sudo apt install [nombre_programa] – It allows us to install a program, along with all its dependencies.
  • sudo apt remove [nombre_programa] – Allows us to uninstall an already installed program.
  • sudo apt update && sudo apt upgrade – The first “update” command updates the software lists to check for new versions, while the second, “upgrade”, is responsible for installing new versions of the programs.
  • sudo apt update && sudo apt dist-upgrade – The first command updates the software lists, while the second updates our Ubuntu to the latest version.

APT Linux Command - 4

Now, Ubuntu is experimenting with a new type of packages, “snap”, that work in a similar way. But, if we want to avoid problems, the ideal is to use APT.

CD and LS, basic for browsing files

As with MS-DOS, we can use the Linux terminal to navigate the entire hard drive directory tree. For example, we can use the “cd” command to go to a specific directory, such as:

  • cd /home/user
  • cd /home/user/Desktop

We can use absolute paths (starting from the root, /), or relative paths to access subdirectories within the current directory we are in.

If we want to know all the files and folders within a directory, we can use another very basic command called:

  • ls

This command is the equivalent of DIR in MS-DOS, it allows us to see everything inside a directory, to know where to continue. Additionally, “ls” can be accompanied by other parameters, such as “-a”, to show hidden files and folders, “-l”, to view detailed information for each item, or “-R”, to view the subdirectories of each one of the directories shown.

TOP, the Linux task manager

As with any operating system, Linux loads a series of processes (called “daemons”) necessary for the OS to function. In addition, all the programs we run also create their own processes, which remain open in memory while we use the software. However, Linux is not perfect, and it is possible that some of them get blocked, just as happens in Windows or macOS. And, then, it is necessary to finish it.

To see all the open processes we can use a universal command called “TOP”. This is, broadly speaking, the basic Linux task manager, with which we can know everything that is running on the PC, as well as the memory and resources that each one uses.

TOP Linux

Along with top, we must also know the “kill” command. This command will allow us to end any of the processes that we can see in “top” based on its ID. If we prefer, we also have another command, “killall”, which allows us to end it by name, which is simpler and more accessible.

Commands for working with files

Of course, the terminal is a very fast tool for creating files and folders, copying data, moving it and even deleting it. Therefore, there are other commands, within this category, that we should also know, such as:

  • touch file – Creates an empty file, named “file”.
  • mkdir folder – Create a folder, named “folder”, in the directory where we are.
  • cp source destination – Copies a file from the “source” directory to the “destination” directory.
  • mv source destination – Move a file from the “source” directory to the “destination” directory.
  • rm file – Delete a file, named “file”, in the directory where we are.

Previous articleTDTChannels adds two new free channels in its latest update
Next articleThe future of using food delivery apps? Without tips, your orders will arrive late and cold