【 Open Program from Console in Linux 】 Step by Step Guide ▷ 2022

For open a program from the console in the OS You must be very careful when accessing with permissions administrator advanced or root. This is because you would leave the doors of your computer open to the entry of malware.

For this reason, it is convenient that you know precisely which are the most used to open and work from Linux and the steps you must take to carry out this task without making mistakes.

If you want to know how it’s done, you will have to keep reading because in this post we will explain everything you need know about this topic.

What are the commands used to open a program from the console in Linux?

The most commonly used commands to open the Linux OS are the following:

  • sudo. This resource allows you to perform actions with privileges of Super user either root. In fact, his name means “Super user does” (super user do).
  • gksudo. It is a tool closely connected to sudo that applies when working with a graphical session, so it will also give you access to administrator privileges. You should take into account that this resource has been discontinued since Ubuntu 18.04.
  • kdesudo. It is a command linked with sudo, also called Kdesu. Allows root privilege actions to be executed as superuser. Such a tool is also discontinued in Ubuntu 18.04.
  • Their. With this command you will work the same as with sudo, but this time it allows you a jump, change or user substitution. Hence the name substitute user either switch user be so appropriate. You should keep in mind that you will have to know the password of the new user you are changing to.
  • gksu. It works like Gksudo resources in graphical environments. It gives privileged access to the execution of programs or apps.
  • kdesu. It has the same pattern of use of kdesudobut this time linked to its to work in graphic sessions.
  • beesu. Offers the ability to open and install programs that require administrator privileges on a distro Fedora.
  • admin: ///. This is a useful variable of gvfs which works similar to gksu in more advanced Linux versions. It offers the possibility of giving access to files to edit or open them, which require root permissions.
  • pkexec. An action of PolicyKit which has replaced sudo Already its on newer versions of Linux. It allows you to run a single program as another user, or superuser if not specified, having the correct authorization and credentials.
  • sudo updatedb. Update the database location to later discover the path of a program. This command is needed when a piece of software does not require administrator access, but is in an unknown location.
  • location. This command works as a file browser on its own database db but you should keep in mind that it does not do it on the entire local hard drive. By extension it works to determine the location of a program.
See also  【 Sort and Filter Data in Access 】 Step by Step Guide ▷ 2022

Learn step by step how to open a program from the Linux console

Know the step by step that you must do to open a program in Linux:

  • The first thing you should do is open the directory where the executable file is located, open the terminal by pressing Ctrl+T or failing that Ctrl+Shift+T.
  • Next, you will have to enter the name of the program and press Enter.
  • If you don’t know where exactly your installed program is, to open it you can use the command location from terminal. Before this, you will need to update the database (db) using the command sudo updatedb.
  • After the previous step you will be able to search without problems the entire path of the program using locate | . You should keep in mind that it is possible that when placing the entire file path executable opens from the terminal correctly.

If you are looking to run the program as administrator or root, then precedes the program name the command sudo. Keep in mind that you just place sudo either sudo -i will ask you for one admin passwordso you will have to enter and continue with your task.

So the process will be:

  • sudo .
  • with sudo you will have a few minutes with free access as administrator
  • You can do the same with the argument its which will change your user and ask for credentials. So you can use the combination sudo su – to have more working time as root.

You will also be able to use the command gksudo, kdesudo either beesu prior to the introduction of the title of graphic applications.

For this you will have to write:

  • gksudo . This can be done in Gnome, Lxde, Mate, Cinnamon, Openbox and Xfce.
  • Instead, if you are in KDE you will have to enter kdesudo
  • When you have a distribution Fedora, you will have to use the command beesu .

If you do not have these commands installed you will have to place:

  • sudo apt-get install gksu in Gnome, Lxde, Mate, Cinnamon, Openbox and Xfce.
  • sudo apt-get install kdesu in KDE.
  • sudo dnf install beesu in Fedora.

You will also be able to generate a pitcher so you don’t have to use the terminal every time you need to open a graphical app.

For this, you will have to do the following:

  • Go to terminal and type gksudo, kdesudo or beesudepending on the desktop environment and the distro used.
  • Then, you will have to enter the name of the program and the location of the files .desktop. This will make it look for the location of the files with *.desktop. For example, kdesudo ~/.local/share/applications/.
  • A file manager will automatically open to view any file .desktop in the computer.
  • Choose the program you need and copy it.
  • inside manager paste it in the same current directory and add a new name.
  • After this, you will have to open it with a text editor searching between the lines for the word Exec followed by the symbol =. Once you have found it enter the middle gksudo, kdesudo or beesu (depends on the Linux distribution used).
  • The result will look like this syntax Exec=beesu %.
  • Next, you will have to save the changes and you will automatically have a launcher of this app prepared in the Linux OS.

Most of the time such commands have an important window in the graphical interface for facilitate access to programs. This is because you will only have to place the name of the software to run and indicate that you will do it as root user. Then you will have to click on To accept. Depending on your version of Linux OSyou can also use the command pkexecan application of the tools PolicyKit.

For this, you will have to carry out the following process:

  • Press Alt + F2 and a window will open in which you will place pkexec followed by the name of the program. For example, pkexec .

Another useful alternative available to you is to use the variable admin: ///which is different from gksusince the program name is placed last.

In this case, you will have to do this step by step:

  • Enter this syntax in the console admin ///:example.de.
Loading Facebook Comments ...
Loading Disqus Comments ...