Is the /home/username/bin directory supposed to be absent?

Hi everyone. During the release of recent versions of openSuse, I remember seeing discussions in this forum about making future versions of openSuse immutable. After installing openSuse Leap 16.0, I noticed that I didn’t have a bin directory for my normal user login. Can anyone tell me if this is probably a consequence of something going wrong during the installation process, or if this is supposed to be a gentle nudge to let me know I should be getting used to using user-created scripts in some completely different way because openSuse is about to become immutable?

I didn’t really do anything particularly noteworthy during the installation process. I thought it was strange that, unlike the installers for pervious versions of openSuse Leap, when I changed the first language option from EN-US to EN-GB, the change did not cascade through the rest of the installer’s options, but that was the only thing of note in the whole process.

Can someone please tell me if this missing ~/bin directory is intentional please? The /root/bin directory is present and empty like I’d expect for my normal user login, though.

This looks like an intentional change.

Normally “/etc/skel” is used as a skeleton for initializing the user home. And the content of “/etc/skel” is much smaller in Leap 16.0 than it was in Leap 15.6.

1 Like

This change has nothing to do with whether or not immutability becomes a part of the standard distributions (I haven’t seen anything that suggests that is happening; Aeon and Kalpa, along with MicroOS are the immutable variants for those who want that).

This change was pushed in TW 20250128:

==== filesystem ====

  • add Provides: may-perform-usrmerge (bsc#1236481)
  • Add support for loongarch64
  • Remove /usr/etc/skel/bin/

(From https://lists.opensuse.org/archives/list/factory@lists.opensuse.org/thread/6PW2MNF5LAI4A45RU4FRBJQT4X2PT27Z/ )

There was discussion prior to that update summary on the factory mailing list about it.

Since TW is upstream from Leap, this change made its way into Leap 16.0 as a result of this change.

1 Like

Well that’s a relief. The discussions I’m talking about were happening when a version of openSuse Leap had just been released. I think was around the release of 15.2. I’m glad to see that openSuse Leap isn’t on the path to becoming immutable. So does this mean I should be fine to make a $USER/bin directory and use it as normal, or is the absence of the directory still intended to be a hint about something?

You absolutely can create a $HOME/bin directory and use it as normal - I’m on TW and I still use it myself.

There’s no reason not to set up your home directory in the way that works best for you. :slight_smile:

I do that, and will continue to do that.

As best I recall, $HOME/bin was traditionally used in unix. But if you wanted that, you had to create if for yourself. And, by the way, configuration files such as “.profile” you also had to create for yourself.

3 Likes

Well, the /etc/skel directory has been in use for a long time. It apparently first appeared in the late 80s as part of AT&T SVR4 dating to circa 1989. I found some references to it in some SunOS release 5.7 documentation (which is a bit more recent, late 90s/early 2000s).

So it’s been around for a while. :slight_smile:

1 Like

It just moved to ~/.local/bin as well, for me it’s a soflink to my data directory and it’s bin folder…

2 Likes

That was it - I was trying to remember/find the info about it, but hadn’t been able to locate it. The factory discussion was much longer ago than I thought it was.

I think you misunderstand something here.

An immutable operating system is about making the “system files” read-only. The user part, that includes all in a users home directory, is of course not part of that. A user can always create change and/or remove files from within his/her home directory. Thus the question as formulated in the title (and answered above) has nothing to do with immutable operating system.

1 Like

BTW, re the existence or not of ~/bin.
When it isn’t there (created by useradd using /etc/skel) and you need it and thus created it yourself, you should then be sure it is in your PATH variable, else it still does not function as it did by default earlier.

henk@boven:~> echo $PATH
/home/henk/bin:/usr/local/bin:/usr/bin:/bin
henk@boven:~> 
2 Likes

You’re absolutely right, Henk. Thanks for the conceptual correction. I thought immutability would be intended to make system files read only and to prevent modification/creation of anything executable by a regular user. That way they’d be protected from doing something like running a script they found lying around on the internet, that might contain an as-yet unknown privilege escalation exploit.

Aha! Exactly the kind of answer I was hoping for.

Hah! Well I guess if anything illustrates my need for my own $HOME/bin directory, where I can put scripts that only I will need to use because I don’t use the commands/variables often enough to stop me forgetting them or getting mixed up, I guess it’d asking “where did my $USER/bin directory go?” :laughing:

1 Like

I knew there was something I’d have to do if I were to create the bin directory manually, but I couldn’t remember exactly what it was. This looks like exactly that thing. I went with what @malcolmlewis said because that was the cleanest solution and meant I wouldn’t have to modify anything, but thanks for the reminder.

https://specifications.freedesktop.org/basedir/latest/ has since 2010 IIRC specified:

User-specific executable files may be stored in $HOME/.local/bin. Distributions should ensure this directory shows up in the UNIX $PATH environment variable, at an appropriate place.

That may be, but why? $HOME/bin is as good as that one. And in openSUSE it was created at user creation and also included in the PATH. A good default action IMO.

So many people, so many ideas. But in the end every user might decide for her/himself.

And in ~/.local there is all sort of stuff that is stored there by all sorts of applications. A place where a user most of the time does not know what is there and barely goes there.

OTOH ~/bin is a good visible place with a revealing name.

I know what I prefer.

Not since 2010 - 0.7 is the version of this document released in 2010, and it excludes mention of .local/bin:

That only appears in 0.8, which is from 2021 (and is the latest version, 0.8).

That said, there are reasonable reasons to put the files in either location.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.