Why are Arch commands slightly different from standard Linux (Unix) commands?

An example. Instead of the commonly used sudo update-grub in Arch Linux, the command sudo grub-mkconfig -o /boot/grub/grub.cfg is used, but there are countless such examples. That is, it seems that those who have learned the basic Linux commands must get used to learning new commands when using Arch Linux.

Because it’s the actual command and update-grub is alias which you can manually create or in case of laziness use:

yay -a update-grub

/usr/bin/update-grub 
#! /bin/sh
set -e
exec grub-mkconfig -o /boot/grub/grub.cfg "$@"
2 Likes

Maybe it wasn’t the best example, but those who used Debian, Ubuntu, Fedora, openSUSE before had to get used to having to learn a little bit different commands in Arch than what they used to know. .

The package manager is different - but that is to be expected. Apart from that I think most common Linux utilities are the same.

I suppose linux-for-the-masses distributions like ubuntu has created scripts or aliases so users didn’t have to memorize commandline options.

A short while ago I saw a topic on dhcpdump - which exist on ubuntu but not on arch.

It turns out to be a convenience wrapper around tcpdump or perhaps just another name or it is included when you install the isc dhcp server :man_shrugging: .

tcpdump -lenx -i eth0 -s 1500 port bootps or port bootpc

I would argue that Arch presents a more real Linux interface without (as said above) all sorts of customized wrappers and aliases.
If you learn the Arch way, you can run the same command (mostly…yes package managers differ in almost every major distro) on any other Linux.

1 Like

update-grub is an Ubuntu project and a package is in AUR. Not updated since 2015.

The upstream URL for the page is incorrect/404. It does have interesting comments.

As with AUR, you are on your own.

I wonder why, there’s a lot to update and check…

/usr/bin/update-grub 
#! /bin/sh
set -e
exec grub-mkconfig -o /boot/grub/grub.cfg "$@"

https://aur.archlinux.org/cgit/aur.git/tree/update-grub?h=update-grub

They are not. The commands you’re referring to are not part of any standard, let alone POSIX, which is the only relevant standard regarding this.

Different distros are different. If they weren’t, there would be no point in having thousands of Linux distros. They use different package managers, different boot loaders, different init systems, different deamons, different desktop environments, etc, etc… Some even use a different standard C library implementation… These different programs have different interfaces, and none of this is standardised in any way (well, obviously the standard C library is standardised, as the name suggests, but there are extensions to it which are not part of any standard and a lot of software relies on such extensions). Just because you are more familiar with one such software stack than another, does not mean that this is the standard.

For example, Void Linux does not use soystemd. So, obviously, any soystemd command (like systemctl) won’t work on a Void Linux system. Recently, EndeavourOS (at least by default) does not use GRUB, so GRUB-specific commands (like grub-mkconfig) will not work on EndeavourOS. Linux Mint does not use snapd, so any command regarding that won’t work, etc… None of those commands are a Linux (or UNIX) standard. Arch is not at all special in this regard.

3 Likes

This discovery was surprising after a good while I typed in the long command line, which I got from somewhere trying to get help to put a bootloader for Slackware. :sweat_smile:

Invented an alias: upgradable helpful these days on Debian “Testing” and always with “Sid” I guess.

I discovered update alias with ArcoLinux; since then I make sure to have it on every single Arch-based installation. Not even using the option anymore from EndeavourOS “welcome”. :smiley:

As has been stated, Arch is actually using the intended command and I believe Fedora does also last I checked their documentation.

Arch changes very little from upstream while a command like update-grub used by Ubuntu actually isn’t “standard” or part of grub. You can alias the command if that’s what you’re use to through.

2 Likes

Don’t forget different users. :wink:

Edit: Some don’t use KDE! :rofl:

Nothing is standard, not even assembly code. :laughing: