this post was submitted on 06 Feb 2024
142 points (96.7% liked)

Linux

48047 readers
1105 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

Examples could be things like specific configuration defaults or general decision-making in leadership.

What would you change?

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 10 points 9 months ago (10 children)

Yeah, I don't understand how you could make installing vim simpler than pacman -S vim? Is it about "-S" being less obvious than "install"?

[–] [email protected] 21 points 9 months ago (8 children)

How about pacman install vim or pacman --install vim or pacman -i vim

What the heck does S mean?! What's all the syncing nonsense. A million obscure parameters that are all single letter, don't tie in with anything meaningful. You might be used to it, but it's a mess of parameters.

[–] [email protected] 0 points 9 months ago* (last edited 9 months ago) (5 children)

You can use an alias for that. Or even a wrapper script that intercepts that.

For example you could place this script in your PATH named idk mmm installpkg (install might be an issue for a name)

Which would do the following:

#!/bin/sh

sudo pacman -S $@

So when you type installpkg vim it will run sudo pacman -S vim

You can repeat that for pacman -Syu, pacman -Rsn, etc. You can even replace pacman for your aur helper instead. (remove the sudo if you will use an aur helper instead).

[–] [email protected] 5 points 9 months ago (1 children)

I think the point is that if one needs to read a thousand pages of documentation before they can start using a new operating system they will just give up regardless of how good it is.

Installing packages is probably one of the first things you'd want to do so there is a lot of value in keeping its design intuitive.

The 'you can make an alias or script for it' argument only works if someone already has a working understanding of the underlying mechanisms. Which you can assume it someone gradually gets introduced to a Programme, but not if they are making a big switch like installing a new OS.

[–] [email protected] 5 points 9 months ago* (last edited 9 months ago)

Oh I totally agree with that. But I don't think the regular a new user should be using CLI tools to install packages. There are plenty of GUI tools that should be doing that for you instead.

And if they did, it should be very simplified with a wrapper script like in the example above, iirc the common command update-grub is a wrapper script that simplifies it, it is a shame this isn't more common with other tasks.

This could be even standardized, like regardless of the distro if you type installpkg vim, the installpkg script would do something like this that will run it thru the most popular packages managers to do the simple operation:

# Install with 'pacman' (if available)
if command -v pacman >/dev/null 2>&1; then
    sudo pacman -S $@ || exit 1
fi

# Install with 'apt' (if available)
if command -v apt >/dev/null 2>&1; then
    sudo apt install $@ || exit 1
fi

# Install with 'dnf' (if available)
if command -v dnf >/dev/null 2>&1; then
    sudo dnf install $@ || exit 1
fi

echo "No package manager found"
load more comments (3 replies)
load more comments (5 replies)
load more comments (6 replies)