this post was submitted on 17 Dec 2024
15 points (82.6% liked)

Linux

8288 readers
418 users here now

Welcome to c/linux!

Welcome to our thriving Linux community! Whether you're a seasoned Linux enthusiast or just starting your journey, we're excited to have you here. Explore, learn, and collaborate with like-minded individuals who share a passion for open-source software and the endless possibilities it offers. Together, let's dive into the world of Linux and embrace the power of freedom, customization, and innovation. Enjoy your stay and feel free to join the vibrant discussions that await you!

Rules:

  1. Stay on topic: Posts and discussions should be related to Linux, open source software, and related technologies.

  2. Be respectful: Treat fellow community members with respect and courtesy.

  3. Quality over quantity: Share informative and thought-provoking content.

  4. No spam or self-promotion: Avoid excessive self-promotion or spamming.

  5. No NSFW adult content

  6. Follow general lemmy guidelines.

founded 2 years ago
MODERATORS
 

Part of what's making learning Linux so difficult for me, is the idea of how fragmented it is. You can install programs with sudo apt get (program). You can get programs with snaps. You can get programs with flatpaks. You can install with tar.gz files. You can install with .deb files. You can get programs with .sh files. There's probably more I don't know about.

I don't even know where all these programs are being installed. I haven't learned how to uninstall them yet. And I'm sure that each way has a different way to uninstall too.

So that brings me to my main question. Why not consolidate all this? Sure, files CAN be installed anywhere if you want, but why not make a folder like /home/programs/ where it's assumed that programs would be installed?

On windows the programs can be installed anywhere, but the default is C:/windows/Program Files x86/ or something like that. Now, you can change it all you want when you install the programs. I could install it to C:/Fuckfuckfuck/ if I wanted to. I don't want to, so I leave it alone because C:/Windows/Program Files x86/ is where it's assumed all the files are.

Furthermore, I see no benefit to installing 15 different programs in 7 different folders. I begrudgingly understand why there's so many different installation methods, but I do NOT understand why as a collective community we can't have something like a standardized setting in each distro that you can set 1 place for all your installation files.

Because of the fragmentation of distros, I can understand why we can't have a standardized location across all distros like Windows has. However I DON'T see why we can't have a setting that gets set upon each first boot after installation that tells each future installation which folder to install to.

I would personally pick /Home/Programs/, but maybe you want /root/Jamies Files/ because you're Jamie, and those are your files.

In either case, as we boot up during the install, it would ask us where we want our program files installed. And from then on, no matter what method of install you chose, it would default to whatever your chosen folder was.

Now, you could still install other places too, but you would need to direct that on a per install basis.

So what's the benefit of having programs each installed in seperate locations that are wildly different?

top 34 comments
sorted by: hot top controversial new old
[–] [email protected] 1 points 2 hours ago

First of all, in Linux everyone should only use software from distribution repositories (eg. via apt command in Debian, Ubuntu, Mint, dnf/yum command in Fedora etc...). Package managers will install software in controlled way and it is really easy to remove them too. And, there is usually gui app for installing apps from distribution repositories.

Second way is to use flatpak / snap. They are pretty much similar and will keep things easy.

Do not install sh packages or tar.gz if you really do not know what you are doing. These are only for expert cases.

One fundamental change coming from Windows is that in Linux, you should never worry about location where software is installed (except for those expert cases, which you should not use). They will be put in correct places always. In Linux, apps are sorted so that executables go to /usr/bin, library files to /usr/lib64 and /usr/lib, applicatoin other non-modifiable stuff to /usr/share etc. It gets quite a lot to get used to, but in long term it feels more natural than Windows way to dump everything in app directory.

My recommendation will be to install some user friendly distribution (Ubuntu, Fedora, Mint) and just go ahead with default package management things what it offers. If you see Android way handling software good, Fedora Silverblue is kind of like that - System upgrades are handled same way, and applications are installed as flatpaks.

[–] [email protected] 1 points 2 hours ago

My strategy is to always install program with flatpak, SDKs are also installed as flatpak, find graphical alternatives to command line programs. I don't use command line a lot, so I don't need fancy tools for it.

I only have one system package installed for inputting unicode math symbols. So that I have a clean and easily migratable system.

[–] Jumuta 3 points 5 hours ago* (last edited 5 hours ago) (1 children)

there's different ways to install things because they each have their use cases in which they're better than others (or used to have use cases)

  • binary package managers (e.g. apt): fast and lightweight because it only downloads/installs the necessary binaries

  • flatpak: can be installed on any distro, but takes up more storage space because they're installed in a sandbox and all the dependencies are also installed with it, for every application

  • snap: same thing as flatpak but a bit worse, but some applications are only packaged for snap because canonical paid a lot of big companies to package for snap (rhey didn't incentivise against flatpak, they just didn't fund flatpak)

  • appimage: the 'windows exe' kinda thing and has all the dependencies bundled so distro agnostic, but you have to manage the appimage files yourself unless you get a manager for it and you can't update them centrally like you can do with other stuff

  • source code repos (e.g. aur): have to compile every new version yourself on your machine, so is slow to update, but often offers things not in the binary package manager

  • .sh files for installation: idk why these are used, they're just annoying. a lot of proprietary software from corpos use them (probably so they can verify dependencies themselves and not trust the system)

  • binariy files (e.g. .deb): same thing as with appimage except they're not distro agnostic

  • tar.gz: is just a compressed file format like zip

[–] [email protected] 1 points 3 hours ago

.sh files for installation: idk why these are used, they're just annoying. a lot of proprietary software from corpos use them (probably so they can verify dependencies themselves and not trust the system)

GOG (Good Old Games) distributes the games using a .sh file containing all the binaries and assets needed for the game. It's strange to think of, but the binary data coexists with textual shellscript instructions, thanks to the exit instruction (which ensures that the shell won't try to interpret the binary data) alongside some awk/grep/tail wizardry to extract the binary data from the current shellscript.

It's probably because .sh can run in any distro, because every distro has a shell interpreter. Also, they don't need to be compiled (differently from .appimage, for example), it's just a merge of a .sh and a binary archive (possibly .tar.gz).

[–] [email protected] 14 points 9 hours ago (1 children)

What you're seeing is the result of decades of new ways to install stuff being added at different times. As a new way is added all the old ways still need to work because getting everyone to switch to the new way is impossible. There is no central authority making these decisions, it's more of a marketplace of ideas with different 'sellers' competing for attention.

[–] [email protected] 2 points 2 hours ago

I might add, everyway actually seek to "consolidate" all the older ways, and always ends up adding to the ways needing to be consolidated.

[–] [email protected] 11 points 11 hours ago* (last edited 11 hours ago) (1 children)

Linux doesn't really have stand alone programs like Windows. A package is a series of files that get placed in the proper places plus some optional scripting. Packages have dependencies so you can't just run a binary from a package. The closest thing Linux as is AppImage but it lost a lot of steam.

In Linux there are two general types of package managers. The first one is native packages. Native packages install to the root filesystem and are part if the core system.

The second type of package manager is the portable format like Flatpak. Flatpaks can either be installed system wide or as a local user. The big difference is that they run in there own environment and have limited permissions. This is done by creating a sandbox that has its own filesystem so that it is independent of the system. This is also what makes them portable as that environment is the same no matter what.

Technically snap packages are portable but you aren't going to see much use outside of Ubuntu since the underlying architecture has so many flaws.

[–] [email protected] -1 points 10 hours ago (2 children)

Now does flatpak get it's programs from the same place that terminal would? I'm still trying to grasp what's even happening here. Because from my experience (limited) I like flatpaks more than any other method used so far, and am unclear why anyone would use terminal if given the choice.

As for snaps, I heard Ubuntu owns the technology behind snaps, and for some reason everybody hates snaps because canonical owns it. Which I don't get. As far as I know they don't abuse snaps, and they don't cause viruses or anything. So why would it matter who owns the technology behind them?

[–] [email protected] 9 points 8 hours ago

everybody hates snaps because canonical owns it

We like of like things to be open so that we can review, or replace. The snap store is proprietary and controlled by canonical. I don't want my data collected and subject to canonical's EULA when using my choice of distro.

Canonical has a hisory of doing bad choices, so the level of trust is not very high. It feels like an attempt at embrace, extend, extinguish. Get people hooked on snaps and then make snaps suck on other distros kind of thing.

[–] [email protected] 7 points 9 hours ago

https://flathub.org/

The reason most people don't like snaps is fairly complicated. It started with Ubuntu forcing some basic packages to install as a snap instead of a native package. The thing is snaps are not native packages and because of this it caused major problems. These days a lot of the issues have been addressed but there are still some serious design flaws. The biggest issue is that it is way overly complex and depends on a privileged daemon. The result of this is poor performance and a clunky experience.

[–] [email protected] 20 points 12 hours ago

Why not consolidate all this?

https://xkcd.com/927/

But, there is actually a location standard: https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard

[–] [email protected] 12 points 12 hours ago* (last edited 2 hours ago) (1 children)

This is part of why these days I just stick to flatpaks. No fragmentation, same on any distro, I know where all the programs are going as well as all their config files.

If I want to back up my flatpaks I can do so trivially.

It's a godsend. Way better than having a bunch of different formats everywhere, or the windows-style some programs installed in XYZ directory, some in program files, some in program files (x86), with config files saved literally anywhere. Maybe it's in one of the dozens of poorly laid out appdata folders, maybe it's where the exe is, maybe it's in documents, maybe it's in C:, maybe it's hidden in my user directory, etc. I've even seen config files saved to bloody onedrive by default, leading to some funky app behaviour when I wasn't connected to the internet, or when I ran out of onedrive space.

[–] [email protected] 1 points 11 hours ago (1 children)

I think it would be cool to see Flatpak enter the server space.

[–] Jakeroxs 2 points 7 hours ago (1 children)
[–] [email protected] 0 points 3 hours ago

No, because docker shows up in random places in your system and takes forever to set up compared to the actual program

There's a few repos for online management consoles and the original version used a .sh file that installed in 30 seconds on a single core free VPS. The docker version was like two minutes and when I uninstalled it, I still have traces of docker on the VPS

[–] [email protected] 8 points 12 hours ago

The idea is to not manage programs by hand to avoid messes.

The multiple solutions come from various needs, but it's more of an underlying complexity of installation than a real intent to have so many.

Ideally we would need one clean package manager that handles everything without ever having to tinker with installation paths and various methods.

[–] [email protected] 6 points 12 hours ago (1 children)

I don't see the issue, since you rarely have to run a program by going to the location of the binary (AppImage and others excluded).

[–] [email protected] 2 points 12 hours ago (2 children)

I just like to understand things, and I like to be organized. Being organized helps me understand things.

Another thing I'm not understanding is, if Android is just Linux anyways, why aren't there PC distros that are just Android?

I need a resource where my brain can actually ask all the questions. Youtube videos are kind of informative. My issue with them is they're more along the lines of "here's how to do this thing that only advanced users will even know the terms being discussed". Whereas I'm like "Where is the uninstall button for programs?"

[–] [email protected] 5 points 11 hours ago (1 children)

Usually right next to the install button. Or, if you used the command line, change apt install vim to apt remove vim.

The best way to learn how to use something is, of course, the manual.

[–] [email protected] 0 points 11 hours ago (3 children)

Is vim a command? Or are you using it as an example of a program? I've only heard of "sudo apt install (program)"

[–] [email protected] 6 points 11 hours ago* (last edited 11 hours ago)

vim is a very common text editor. hes just using it as an example program to install/remove

[–] [email protected] 3 points 11 hours ago (1 children)

Are you on Linux Mint? If so it has a application for installing and removing packages.

[–] [email protected] 0 points 10 hours ago (1 children)

I'm on ZorinOS actually, but I'm not sure if it's permanent. I'm going to be buying a bunch of smaller SSD's next month. Just trying a crapload of new distros. I haven't landed on anything yet.

[–] [email protected] 1 points 9 hours ago

Distro doesn't really matter. Most of it is the same.

[–] [email protected] 3 points 11 hours ago (1 children)

I literally just said to read the manual. It will tell you much more than you are asking.

[–] [email protected] 0 points 9 hours ago (1 children)

I'm still at work, so I'm not near my computer. Plus.....I'm not sure which manual you mean. I didn't mention my distro.

[–] [email protected] 1 points 3 hours ago

"the manual" in linux always refers to the man command. run it with the name of a command as an argument an you will get a full description of how that command is used.

[–] [email protected] 2 points 11 hours ago (1 children)

What do you like about Android

[–] [email protected] -2 points 10 hours ago (2 children)

One of the big problems I see with Linux is the lack of software that people know. The response seems to often be "Well we don't have THAT, but we have this alternative....". And the reason for that is the big name software sticks to where they know the userbase is.

Android on the otherhand IS where the userbase is. You're either on iPhone, or you're on Android. So there's a lot of software already available, ready to run. It would work the same on both your phone and PC, since it literally is the same apk. And it will always have support, due to being one of the main ways people use phones.

The fact that Linux HASN'T found way to use APKs and android based distros baffles me, as it already has a MASSIVE foothold into what people know. There's so much potential there! Imagine plugging your cell phone into a desktop via a dock, or a usb cable, or even some wireless communication (not bluetooth or wifi), and suddenly your entire PC set up is actually running off your phone. For most people, their cell phone would be a good enough desktop if it had a desktop mode. I connected a keyboard with trackpad, to my Samsung A8 android tablet, and don't feel the need for an actual laptop. I use Win-X launcher to give it a traditional desktop launcher feel, and I'm happy with it.

[–] [email protected] 4 points 8 hours ago (1 children)

I don’t understand what you are saying. Android is missing a bunch of stuff that linux users rely on for a full desktop experience. They have completely different use cases. Android isn’t designed with desktop in mind, Linux is. A lot of the linux apps I rely on aren’t on android and vice versa.

[–] [email protected] -1 points 7 hours ago (1 children)

A lot of the linux apps I rely on aren’t on android and vice versa.

That's exactly my point. I'm saying since it runs on the same format anyways, why NOT make it run on both? Then when someone uses an app on their phone, you could convince them to use that same app on a desktop, since they know it.

And then, once it's established to people that Android and Linux work together, publishers will start designing their Android apps like a hybrid. Eventually phones would just become Linux distros on a phone. And when you get home, you connect a mouse/keyboard, and switch to PC Mode. And eventually every Linux program would work on Android, and every apk would work on Linux distros.

And both ecosystems would gain a huge amount of software.

[–] [email protected] 1 points 3 hours ago

I'm saying since it runs on the same format anyways, why NOT make it run on both?

it's not the same format. android is using an old linux kernel, yes, but the two systems are not compatible at all.

interestingly, what you're talking about exists. it's called samsung dex. they are cancelling it because nobody uses it.

[–] [email protected] 3 points 9 hours ago* (last edited 9 hours ago)

You can run Waydroid for android app support. I'm not really sure I understand what you are saying. "Big name" proprietary software will never come to Linux as there is no incentive for companies to spend money on that. You technically can run pretty much any Android app on Linux but that's a privacy nightmare

[–] [email protected] 4 points 12 hours ago* (last edited 12 hours ago)

I understand fragmentation here, as you can get what you need in a format that works well-enough.

Different package formats often have technical differences. Recently I had the choice to use something from a flatpak to reduce lib32 dependencies on my system... but I didn't go with that as the other dependencies it needed (openGL, graphics driver etc) were redundant thanks to sandboxing (~2GB download!).

Anything native from itch, GOG, or humble doesn't really 'install' but rather they are just extracted... so the files should be what it is (portable, except game saves/user data likely won't be). This allows you to run it off of a slower+larger-capacity drive.

EDIT: Also if you need to compile it, probably will also just compiled to where you put it (to a bin folder).

Non-system stuff like this is more viable for things that you don't need updated frequently/ever (particularly games/software post-development). For sure most-of-the-time the best experience is via your package manager.