Proper way to install/locate executables

I need some 3rd party software that represent executables, some of them need internet access, however I’m not sure what is the right way to install/execute them, so it will provide as less harm as it can to my system.
Maybe some specific location will be appropriate?
Maybe some special permissions?

Hi @crazzy_dude,

First step, in my opinion, is to check if it’s not in the AUR.

If you can’t find it there, I think best would be to copy/extract it to:

~/.local/bin/

That way, they’re in your personal home directory and won’t get overridden by updates or something.

Oh, and you might need to set it executable:

chmod +x ~/.local/bin/<file>

Where <file> is the executable you want to run. While this might not be strictly neccessary for all files, as far as I know it is for all standalone executable binary files.

I don’t think anything else, regarding permissions, is required.

Hope this helps!

so far, this could be anything

Often such software can be found in the AUR or as flatpak or snap.
Windows executables will need some version of wine to run - and even then it’s not at all sure that it will work fully.

Linux executables can in principle be put anywhere.
More information from you is needed to give more specific answers.

1 Like

It’s not available via flatpak/snap/aur etc, but I don’t wanna go to specifics with this one due to privacy reasons.
It’s more like a Windows’s software/game that have linux version of it.

Does it have a direct impact(access level or anything alike) if it’s under ~/.local/bin or somewhere else, say ~/Downloads?

Also, should I treat .appimages similarly?

~/.local/bin
is usually in your $PATH - you can call the executable by it’s name from anywhere
otherwise, you’d have to provide the full PATH to the executable

I have no idea about these. :man_shrugging:

1 Like

Not as far as I know.

I used to simply set those executable and run therm. However, I’ve since adapted my method. Not I just save it in ~/Applications/ and execute it like this:

AppImageLauncher ~/Applications/<file>.AppImage

Where <file>.AppImage is the .AppImage file to execute.

I actually don’t have that directory - ~/.local/bin, not a problem to create it, but shouldn’t it be set, if it should be in the $PATH globals or am I missing something here?

If you’re using linux then you should at least in general know the file system hierarchy structure. Of course no one is forcing you to use or do anything.

https://man.archlinux.org/man/file-hierarchy.7.en

1 Like

Thanks for that link, it was helpful.

If the exexutable is a single binary, for example rar or unrar, placing them in ~/.local/bin is an established norm due to that location being automatically added to your $PATH - that is the direct impact of using that location.

For other applications that have a more complex directory structure (apps, games, etc.), if they have an installer, then installng under /opt is an often used alternative (elevated privileges required).

For .appImage files, selecting a location to store them is advisable.

There is no set location, however, wherever you choose should be used consistently, especially when using AppImageLauncher to integrate them into your environment. In that case, the same path should be entered into AppImageLauncher’s configuration.

I simply use ~/.appimages/ for convenience.

AppImageLauncher automatically (most times) creates a launcher for the application in ~/.local/share/applications which is then accessible from your System Menu.

I hope this was useful. Cheers.

3 Likes

It was, thanks a lot