Starting with Linux

At the business level, it is not a secret for anyone that the majority of servers for small, medium, and large companies are running on Linux due to the immense number of features it possesses.

Now, at a personal level, for example, when we start in the world of programming, most developers become extremely curious to learn it either because of its high demand in the job market, its philosophy, a colleague’s suggestion, a personal project, among many other reasons. So, a large number of us decide to venture into this world and install the penguin’s operating system (in most cases, using the Debian distribution with Ubuntu for its graphical interface), run it alongside Windows (which is very easy nowadays), or in extreme cases, format the Windows computer to operate only with Linux.

A good way to start is by learning the basic about executing commands through the console or terminal (we’ll delve into the installation and most used distributions in another blog), navigating the file system where we will come across the following directories:
/bin: This is where the main Linux commands such as ls or mv reside.

/boot: Here, the boot loaders and system startup files are located.

/dev: This path contains all mounted physical devices such as USBs or DVDs.

/etc: Contains the configuration of installed packages.

/home: System users will have their personal folder to place all their additional folders with their names as shown below: /home/codigoefimero.

/lib: This is where libraries of installed packages are stored, as these libraries are shared among all packages. Unlike Windows, you can find duplicates in different folders.

/media: In this path, external devices such as DVDs and USB pendrives are found, and you can access their files from here.

/mnt: Other things are mounted here, such as network locations and some distributions that you may have mounted on a pendrive or DVD.

/opt: Some optional packages are found here, and this path is managed by the package manager.

/proc: Since everything in Linux is a file, this folder contains the processes running on the system, and you can access them to obtain information about the current processes.

/root: The home folder for the root user.

/sbin: Like /bin, but with binary files only for the root user.

/tmp: Contains temporary files.

/usr: This is where utilities and files are shared among users in Linux.

/var: Contains system logs and other variable data.

This gives us a general idea of a base installation, so now let’s take a look at some of the most elementary commands:

Basic Linux Commands

When we list with ls -l, we get a first character that represents:

– for a file
d for a directory
l for a symbolic link

File Permissions

It is defined by 9 characters in the order of user permissions, for example: rw-rw-r–
r: Read permission
w: Write permission
x: Execution permission
-: No permission assigned
To play around with permission assignment and understand it more practically, I recommend going to the following link: Chmod Calculator (chmod-calculator.com)

+ The first 3 characters are for the user
+ The next 3 are for the group
+ The last 3 are for other users in the operating system

Listing all files, including those defined as hidden:


ls has a wide range of options such as:

ls -ltr: Sort files by modification date in descending order.

ls -lt: Sort files by modification date.

ls –x: Sort elements first by name and then by extension.

lsR: Display the contents of all subdirectories recursively.

  • To navigate between directories, use cd directory_name.
  • To go back to the previous directory, use cd ..
  • To go back two directories: cd ../../
  • Create a directory: mkdir
  • View the content of a file: cat file_name.
  • To edit or view the content of a file, you can use the vim or nano editor.

Now, if we want to know the current directory:

Print Working Directory: is used to display the current directory we are working in.


View the size of the current directory:


For displaying the processes running in RAM and CPU, we have the command htop.

Hard drive

Command to find the heaviest directories:

To check the available disk space:

Plus, to find out the amount of RAM memory:

In order not to extend ourselves too much because the list of basic commands is quite extensive, we will conclude the blog here, leaving the invitation open to learn more about the other available commands.

Me Gusta
Share
Etiquetado en