I'm not a total newbie to Linux, but this is my first time installing it in almost ten years. While setting up, I'm installing lots of programs, many of which only come as tarballs.
My past approach was to create a directory in my home folder named ~/programs, and then have subdirectories like ~/programs/foobar where I unpacked the tarballs. I'd also make a .desktop file for each app there and create symlinks for easy access on my desktop and in other folders. Since I'm the sole user, system-wide installation isn't a concern for me.
I planned to follow the same method for jar files and appimages too, as long as they're straightforward. I've heard some people suggest using /usr/local/bin and /usr/local/lib, or even /opt. What are the benefits of those directories compared to just using my ~/programs directory?
Also, I typically add those folders to my PATH so I can access them easily.
3 Answers
There's nothing wrong with your method! Some folks might say it's better because it avoids conflicts with system-wide applications. However, it might be worth noting that with more programs being available through formats like Flatpak, the need for manual installation may have decreased a bit.
Using /usr/local/bin or /opt is typically recommended for third-party apps. /opt is usually for fully independent packages, while /usr/local/bin is better suited for programs installed from tarballs. But honestly, Linux is all about flexibility, so if ~/programs works for you, go for it! I store my appimages in a ~/Applications link shared across my distros.
Your approach is perfectly fine! I usually put things like that in ~/.local, but there’s really no harm in how you're organizing it. Just remember not to clutter the root filesystem with user-specific apps unless they come in a package format like .deb or .rpm, which are easier to remove when needed.

I like keeping everything in ~/programs because it makes it easy to transfer my setup to another machine with Ubuntu, especially since I have a script that handles most of the basic installs. It just seems simpler to keep everything in my home directory.