5 ms·
The post linked from this article says: Great. It is spread everywhere this kind of complication for everyday tasks. Want to install something, need to typ
by txutxu 11y ago
The post linked from this article says:
Great. It is spread everywhere this kind of complication for everyday tasks. Want to install something, need to type:
apt-get install something
Since we only use apt-get for installing stuff, why not?
apt-get something
I will give a response I didn't see in any comment there, in the original post, neither in this post or here:
Because it could fail miserably trying to install like this, any package named like a subcommand.
apt-get remove # is installing package remove?
# or is failing the remove subcmd without args
You can workaround that, by apt-get install remove in that case, but the error at first try is counter-intuitive.
Edit: fix my last example
- nunobrito 11y agoOriginal post author here, Nuno Brito Except that exists no package named "remove" available today in mainstream Linux.. So we are forcing every single user across decades to use "install" because a "remove" package is prophesied and we couldn't reserve this keyword. Well, that's XKCD material.. :-) But without playing: If you see the current syntax as good enough, that is OK. The point is usability on upcoming command line tools.
- talideon 11y agoYou'd just be replacing one inconsistency with another: you couldn't use any command names as package names or the reverse without some kind of special case, which would be just as bad. The real solution would be to get rid of the split between apt-get, apt-cache, &c., which is a real UI issue, and just use a single 'apt' command. Then you'd have 'apt install package' - two of the usability issues with 'apt-get' go away if you do that: the need to use a bunch of other tools for no good reason and the '-get' wart at the end. And guess what: that happened in Debian and its derivatives a fair while ago. It's just that nobody made a big deal of it. Here's the relevant section of the handbook: https://debian-handbook.info/browse/stable/sect.apt-get.html https://debian-handbook.info/browse/stable/sect.apt-get.html
- phillc73 11y agoAgreeing with you. apt-get purge apt-get autoremove apt-get update apt-get dist-upgrade Plenty of other uses for apt-get besides install.
- r0muald 11y agoFurthermore, current versions of Debian/Ubuntu have the newer apt command
- JelteF 11y agoThis has actually been made a lot easier. You can now just use: apt install something apt remove something apt search something instead of apt-get install something apt-get remove something apt-cache search something The new apt command also has a progress bar. So I've started using it exclusively now instead of the different apt-x commands.
- seanp2k2 11y agoLink to docs for that? Not seeing it on the Debian or Ubuntu sites https://www.debian.org/doc/manuals/debian-handbook/apt.en.html https://www.debian.org/doc/manuals/debian-handbook/apt.en.ht... The Ubuntu 16.04 docs mention using "aptitude install" but the official docs still mention "apt-get install": https://help.ubuntu.com/16.04/installation-guide/amd64/apds04.html#idm45493212173104 https://help.ubuntu.com/16.04/installation-guide/amd64/apds0... https://help.ubuntu.com/12.04/serverguide/apt-get.html https://help.ubuntu.com/12.04/serverguide/apt-get.html
- JelteF 11y agoYeah I don't know why it is not introduced more. But here are some references from 2 years ago when it was released: https://mvogt.wordpress.com/2014/04/04/apt-1-0/ https://mvogt.wordpress.com/2014/04/04/apt-1-0/ https://lists.debian.org/debian-devel/2014/04/msg00013.html https://lists.debian.org/debian-devel/2014/04/msg00013.html And the HN post I made because the previous comment got so many upvotes that I thought lots of people didn't know about it. https://news.ycombinator.com/item?id=11229406 https://news.ycombinator.com/item?id=11229406
- julian-klode 11y agoThere is a manual page. Nobody updated those fancy doc things. http://manpages.debian.org/cgi-bin/man.cgi?query=apt http://manpages.debian.org/cgi-bin/man.cgi?query=apt
- julian-klode 11y agoNow, I was wrong, apt is indeed already in the handbook. "6.2. aptitude, apt-get, and apt Commands" https://www.debian.org/doc/manuals/debian-handbook/sect.apt-get.en.html https://www.debian.org/doc/manuals/debian-handbook/sect.apt-...
- agumonkey 11y agoIt's the start button story again. <get> + <remove> is absurd somehow. And longer. For discovery and ergonomics, all this should be facaded under sys or deb. deb install deb remove deb search | info ... dpkg is still on point, it's less about system integration, and more about archives themselves.
- julian-klode 11y agoJust use apt. apt install apt remove apt search apt update etc.
- yrro 11y agoFor some reason, “Since we only use apt-get for installing stuff, why not? apt-get something” really pushes my buttons. Perhaps I'm reading too much of my own biases into my interpretation, but this sounds like it's written by a developer who has only ever used apt to blindly install a list of packages in a Dockerfile, rather than someone who has any system administration experience. And that's fine, except that maybe they should have taken two seconds to read the apt-get manual, and realise that apt doesn't just _install_ packages, but it also, shockingly, allows for them to be removed and upgraded too... Now I've gotten that off my chest, perhaps a more favourable interpretation would be that they are trying to say that they would prefer separate 'apt-get', 'apt-remove', 'apt-search' commands, in which case they'd have a point. Fortunately there is now a new 'apt' command that can perform the most common operations that users commonly invoke via the apt-get and apt-cache commands.
- nunobrito 11y agoNuno Brito, original post author. Sorry to disappoint but professionally administrating Linux machines since 2004, started as end-user in 1998 and I work with whatever machines are available. My apologies if the blog post is read as an attack on apt-get, this is not the case. It is just an example. Not saying that we can/should change apt-get, there was apt already made for that purpose. This example is only to raise attention for upcoming command line tools and respective authors to think about the most frequent use-case scenarios and then make them as straightforward as humanly possible.
- yrro 11y agoNo worries; as I say I am clearly reading too much into the original throwaway quote!
- cyphar 11y agoDebian isn't the only system on the block, and apt isn't the only package manager. OpenSUSE has zypper (which IMO has a much better interface and supports patches to packages). Arch has pacman (which has less features, but is great for normal use on your local machine, I wouldn't recommend it for administrating a server -- not just because it's rolling release). apt has a very janky interface overall, there are better alternatives IMO.