2

I am a beginner Ubuntu person. How is it possible when you do an apt-get install [program] that you know what the actual install directory is? After I install a program, I literally have no idea how to nagivate within the terminal to the install directory in order to execute the program & it's very much frustrating me.

john smith
  • 3,033
  • You don't need to. GUI applications install a .desktop file, which makes the application available in Dash (click the icon in the top-left, type the application's name, assuming you are on Unity). If you'd like to run it from the command line, just type the application's name is enough. – Jacob Vlijm Jun 06 '15 at 04:37

2 Answers2

2

If it a graphical program, it will be in your menu. If it is a command line application just type the command in your terminal.

To find the location, type

which <command>

Linux organized the file system different then Windows, so packages put files in a range of locations.

See

enter image description here

Panther
  • 102,067
1

You do not have to enter the install directory to run the program, you just have to enter the command itself.

For example the command ls is located in /bin/ls. However you can run the command just by entering ls in the terminal. If you want to run a GUI application, you can search for the program name from the dash.

Rumesh
  • 1,439
  • Thanks, that will save me a lot of time! I have not managed to get this to work for my teamspeak3 application though. Can you explain why not? I literally have to open the file manager gui or navigate to the folder to execute the ts3client_runscript.sh script. Otherwise it don't load. – john smith Jun 06 '15 at 04:44
  • Where is this file located? is it in the /home directory? – Rumesh Jun 06 '15 at 04:52
  • No I just extracted the installation to my desktop. Should I be extracting programs to my /home directory then? – john smith Jun 06 '15 at 04:53
  • No, I meant to ask if the script is located somewhere in the /home directory or its subdirectories. If the script is in the desktop, you have run `~/Desktop/scriptname – Rumesh Jun 06 '15 at 04:56
  • Hi no it's within a folder on my Desktop. So basically you are saying I would have to actually navigate to the folder and execute it then? How do you know what programs will execute from just the name of the file vs full path? – john smith Jun 06 '15 at 05:09
  • Usually the files located in the /home directory or its subdirectories need the path while the files located in some other directory can be run with just the command. You do not exactly have to navigate to the directory. You can just enter the file path in the terminal. If you want to launch from GUI, You need to navigate to the right folder first – Rumesh Jun 06 '15 at 05:13
  • Ok thank you. So should I just start installing all my programs to my home directory from now on so that I can easily execute them? It's not very clear with Linux where you should install stuff, unlike Windows where you just install to c:\program files – john smith Jun 06 '15 at 05:38
  • no it's not like that, usually programs are installed from the software center(or apt-get) or the .deb file. If the program does not come in a deb file, i am not that sure where to install it if it does not come as a deb file, but my guess would be the home directory – Rumesh Jun 06 '15 at 05:42
  • No problem always glad to help – Rumesh Jun 06 '15 at 07:20