As someone who is confused when he has to deal with a .deb file and always has to google what to do with it - what is the advantage of a .deb over let’s say a shell script?
It might be different for other distros, but for me on MX Linux, I just click on the .deb and it opens a shell with a root prompt and installs the file automatically. Easy peasy.
If made correctly (which is hilariously easy), it’s a clean install and uninstall process, support some level of potential conflict regarding files that are shared with other packages/commands, support dependencies out of the box, and with minimal work can be made easy to update for the user (even automatically updates, depending on the user’s choices) by having an (again, very easy to setup for a dev) repository. With the added value of authenticity checks before updating.
All this in a standardized way that requires no tinkering, compatibility stuff, etc, because all these checks are built-in.
Note that some of this probably applies to other system package management solutions, it’s not exclusive to .deb.
I never fully trust a shell script and usually end up reading any I have to use first, so I know what they do. And after so many years dpkg holds no mysteries for me and Discover will install .debs if I double click while in KDE.
Yeah. They all come with risks, but I psychologically struggle to run shell scripts unless I know what’s in them. And the same brain dysfunction makes my automatically distrust a script that doesn’t set pipefail.
Which can be read as: (Debpackage) -install <nameofpackage.deb>
That’s it!
Also, if you haven’t already, install tldr (apt install tldr), then you can ‘tldr deb’ (or any other command) to get a few examples of their most used functions.
As someone who is confused when he has to deal with a .deb file and always has to google what to do with it - what is the advantage of a .deb over let’s say a shell script?
It might be different for other distros, but for me on MX Linux, I just click on the .deb and it opens a shell with a root prompt and installs the file automatically. Easy peasy.
Well for one a .deb comes out of the box with an uninstall machenism. As well as file hashes, package singing, etc…
If made correctly (which is hilariously easy), it’s a clean install and uninstall process, support some level of potential conflict regarding files that are shared with other packages/commands, support dependencies out of the box, and with minimal work can be made easy to update for the user (even automatically updates, depending on the user’s choices) by having an (again, very easy to setup for a dev) repository. With the added value of authenticity checks before updating.
All this in a standardized way that requires no tinkering, compatibility stuff, etc, because all these checks are built-in.
Note that some of this probably applies to other system package management solutions, it’s not exclusive to .deb.
I never fully trust a shell script and usually end up reading any I have to use first, so I know what they do. And after so many years dpkg holds no mysteries for me and Discover will install .debs if I double click while in KDE.
It’s worth knowing that .deb files can contain setup scripts that get run as root when installed, so you should trust them too.
Yeah. They all come with risks, but I psychologically struggle to run shell scripts unless I know what’s in them. And the same brain dysfunction makes my automatically distrust a script that doesn’t set pipefail.
That definitely makes sense. Also, the scripts in a .deb should be incredibly short and readable, if you choose to check them out.
dpkg -i <nameofpackage.deb>
Which can be read as: (Debpackage) -install <nameofpackage.deb>
That’s it!
Also, if you haven’t already, install tldr (apt install tldr), then you can ‘tldr deb’ (or any other command) to get a few examples of their most used functions.