I use cli most of the time. Today, I noticed ls is different. Digging a bit I found:
ubuntu 26
ls --version
ls (uutils coreutils) 0.8.0
ubuntu 24
ls --version
ls (GNU coreutils) 9.4
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Richard M. Stallman and David MacKenzie.
To revert back to the GNU ls use gnuls You can also edit your .bashrc and fix aliases. It seems ubuntu wants to eliminate GNU utils and replace them with rust utils. Donāt understand the logic.
alias ls='gnuls --color'
# some more ls aliases
alias ll='ls -al'
alias la='ls -A'
alias l='ls -CF'
Given that the issue has been resolved, Iām curious as to how you noticed the difference. While not a direct clone, upstream does strive to make uutils as GNU coreutils compatible as possible. They have an extensive test suite to match the output of utilities to their GNU counterparts. Iām sure, theyād like your input, since you were able to spot the difference without looking first.
@Peterwhite23, a simple ls on u26 showed me all dirs at the bottom. Went to u24, different output. Tried ls --version on both, different, one referred to rust utils, the other GNU utils. Since Iām a visual person and use cli, I notice things.
u26 output - all dirs at the bottom
user@u26:~$ ls -l
total 104
drwxr-x--- 19 user user 4096 Apr 29 07:54 .
drwxr-xr-x 3 root root 4096 Apr 24 06:36 ..
-rw------- 1 user user 51 Apr 24 07:22 .Xauthority
-rw------- 1 user user 1651 Apr 29 07:23 .bash_history
-rw-r--r-- 1 user user 220 Feb 13 05:16 .bash_logout
-rw-r--r-- 1 user user 4484 Apr 29 07:54 .bashrc
drwx------ 15 user user 4096 Apr 24 07:22 .cache
drwx------ 15 user user 4096 Apr 24 06:50 .config
drwx------ 2 user user 4096 Apr 24 14:00 .gnupg
drwx------ 4 user user 4096 Apr 24 06:37 .local
drwx------ 9 user user 4096 Apr 29 06:21 .nx
-rw-r--r-- 1 user user 807 Feb 13 05:16 .profile
drwx------ 2 user user 4096 Apr 24 06:42 .qt
drwx------ 2 user user 4096 Apr 24 06:37 .ssh
-rw------- 1 user user 3151 Apr 29 07:54 .viminfo
drwxr-xr-x 2 user user 4096 Apr 24 06:37 Desktop
drwxr-xr-x 2 user user 4096 Apr 24 06:37 Documents
drwxr-xr-x 2 user user 4096 Apr 24 06:41 Downloads
drwxr-xr-x 2 user user 4096 Apr 24 06:37 Music
drwxr-xr-x 2 user user 4096 Apr 24 06:37 Pictures
drwxr-xr-x 2 user user 4096 Apr 24 06:37 Public
drwxr-xr-x 2 user user 4096 Apr 24 06:37 Templates
drwxr-xr-x 2 user user 4096 Apr 24 06:37 Videos
drwxrwxr-x 2 user user 4096 Apr 24 17:31 nas
drwx------ 9 user user 4096 Apr 24 09:00 snap
u24 output - not so
drwxr-xr-x 22 user user 4096 Apr 29 07:58 ./
drwxr-xr-x 3 root root 4096 Aug 13 2022 ../
drwx------ 3 user user 4096 Aug 13 2022 .ansible/
-rw------- 1 user user 9962 Apr 29 07:23 .bash_history
-rw-r--r-- 1 user user 220 Aug 13 2022 .bash_logout
-rw-r--r-- 1 user user 4256 Nov 4 2022 .bashrc
drwx------ 19 user user 4096 Dec 28 13:18 .cache/
drwx------ 21 user user 4096 Nov 26 05:22 .config/
drwxr-xr-x 2 user user 4096 Aug 8 2025 Desktop/
drwxr-xr-x 3 user user 4096 Nov 8 2023 Documents/
drwxr-xr-x 2 user user 4096 Dec 28 13:29 Downloads/
drwx------ 2 user user 4096 Apr 10 16:51 .gnupg/
drwx------ 4 user user 4096 Aug 8 2025 .local/
drwxr-xr-x 2 user user 4096 Aug 13 2022 Music/
drwx------ 209 user user 20480 Apr 20 06:36 .nx/
drwxr-xr-x 2 user user 4096 Aug 13 2022 Pictures/
drwx------ 3 user user 4096 Sep 22 2025 .pki/
-rw-r--r-- 1 user user 807 Aug 13 2022 .profile
drwxr-xr-x 2 user user 4096 Aug 13 2022 Public/
-rw------- 1 user user 12 Aug 13 2022 .python_history
drwxrwxr-x 4 user user 4096 Aug 8 2025 .qmmp/
drwx------ 2 user user 4096 Aug 13 2022 .qt/
drwxr-xr-x 2 user user 0 Apr 24 07:11 share/
drwx------ 7 user user 4096 Sep 21 2025 snap/
drwx------ 2 user user 4096 Aug 13 2022 .ssh/
drwxr-xr-x 2 user user 4096 Aug 13 2022 Templates/
drwxr-xr-x 2 user user 4096 Aug 13 2022 Videos/
-rw------- 1 user user 983 Nov 20 2022 .viminfo
-rw------- 1 user user 0 Aug 13 2022 .Xauthority
Iāve just checked with uutils 0.8.0 built from upstream and I donāt get all directories at the bottom. In fact the output is identical:
cd $TMPDIR
touch {1..9}
mkdir {10..19}
ls -l
total 4
-rw-r----- 1 peter peter 0 Apr 29 17:11 1
drwxr-x--- 2 peter peter 40 Apr 29 17:11 10
drwxr-x--- 2 peter peter 40 Apr 29 17:11 11
drwxr-x--- 2 peter peter 40 Apr 29 17:11 12
drwxr-x--- 2 peter peter 40 Apr 29 17:11 13
drwxr-x--- 2 peter peter 40 Apr 29 17:11 14
drwxr-x--- 2 peter peter 40 Apr 29 17:11 15
drwxr-x--- 2 peter peter 40 Apr 29 17:11 16
drwxr-x--- 2 peter peter 40 Apr 29 17:11 17
drwxr-x--- 2 peter peter 40 Apr 29 17:11 18
drwxr-x--- 2 peter peter 40 Apr 29 17:11 19
-rw-r----- 1 peter peter 0 Apr 29 17:11 2
-rw-r----- 1 peter peter 0 Apr 29 17:11 3
-rw-r----- 1 peter peter 0 Apr 29 17:11 4
-rw-r----- 1 peter peter 0 Apr 29 17:11 5
-rw-r----- 1 peter peter 0 Apr 29 17:11 6
-rw-r----- 1 peter peter 0 Apr 29 17:11 7
-rw-r----- 1 peter peter 0 Apr 29 17:11 8
-rw-r----- 1 peter peter 0 Apr 29 17:11 9
drwxr-x--- 4 peter peter 80 Apr 25 23:19 firefox
-rw-r----- 1 peter peter 2133 Apr 29 16:52 rustix_test_can_compile
---------- 1 peter peter 0 Apr 29 14:26 test
uu_ls -l
total 4
-rw-r----- 1 peter peter 0 Apr 29 17:11 1
drwxr-x--- 2 peter peter 40 Apr 29 17:11 10
drwxr-x--- 2 peter peter 40 Apr 29 17:11 11
drwxr-x--- 2 peter peter 40 Apr 29 17:11 12
drwxr-x--- 2 peter peter 40 Apr 29 17:11 13
drwxr-x--- 2 peter peter 40 Apr 29 17:11 14
drwxr-x--- 2 peter peter 40 Apr 29 17:11 15
drwxr-x--- 2 peter peter 40 Apr 29 17:11 16
drwxr-x--- 2 peter peter 40 Apr 29 17:11 17
drwxr-x--- 2 peter peter 40 Apr 29 17:11 18
drwxr-x--- 2 peter peter 40 Apr 29 17:11 19
-rw-r----- 1 peter peter 0 Apr 29 17:11 2
-rw-r----- 1 peter peter 0 Apr 29 17:11 3
-rw-r----- 1 peter peter 0 Apr 29 17:11 4
-rw-r----- 1 peter peter 0 Apr 29 17:11 5
-rw-r----- 1 peter peter 0 Apr 29 17:11 6
-rw-r----- 1 peter peter 0 Apr 29 17:11 7
-rw-r----- 1 peter peter 0 Apr 29 17:11 8
-rw-r----- 1 peter peter 0 Apr 29 17:11 9
drwxr-x--- 4 peter peter 80 Apr 25 23:19 firefox
-rw-r----- 1 peter peter 2133 Apr 29 16:52 rustix_test_can_compile
---------- 1 peter peter 0 Apr 29 14:26 test
BTW, the / at the end of dir names in your output, @pavlos, suggests an alias in the mix that includes the -p switch. Maybe check your ls alias? Or run it like this:
Iām using the default .bashrc, my only change is from ll=ls -alF to ll=ls -al (omit F)
I tried your example, hereās my output on u26, touch 1..5, mkdir 10..14
with your example
user@u26:~$ ll
total 124
drwxr-x--- 24 user user 4096 Apr 29 08:34 .
drwxr-xr-x 3 root root 4096 Apr 24 06:36 ..
-rw------- 1 user user 51 Apr 24 07:22 .Xauthority
-rw------- 1 user user 1651 Apr 29 07:23 .bash_history
-rw-r--r-- 1 user user 220 Feb 13 05:16 .bash_logout
-rw-r--r-- 1 user user 4484 Apr 29 07:54 .bashrc
drwx------ 15 user user 4096 Apr 24 07:22 .cache
drwx------ 15 user user 4096 Apr 24 06:50 .config
drwx------ 2 user user 4096 Apr 24 14:00 .gnupg
drwx------ 4 user user 4096 Apr 24 06:37 .local
drwx------ 9 user user 4096 Apr 29 06:21 .nx
-rw-r--r-- 1 user user 807 Feb 13 05:16 .profile
drwx------ 2 user user 4096 Apr 24 06:42 .qt
drwx------ 2 user user 4096 Apr 24 06:37 .ssh
-rw------- 1 user user 3151 Apr 29 07:54 .viminfo
-rw-rw-r-- 1 user user 0 Apr 29 08:31 1
drwxrwxr-x 2 user user 4096 Apr 29 08:34 10
drwxrwxr-x 2 user user 4096 Apr 29 08:34 11
drwxrwxr-x 2 user user 4096 Apr 29 08:34 12
drwxrwxr-x 2 user user 4096 Apr 29 08:34 13
drwxrwxr-x 2 user user 4096 Apr 29 08:34 14
-rw-rw-r-- 1 user user 0 Apr 29 08:31 2
-rw-rw-r-- 1 user user 0 Apr 29 08:31 3
-rw-rw-r-- 1 user user 0 Apr 29 08:31 4
-rw-rw-r-- 1 user user 0 Apr 29 08:31 5
drwxr-xr-x 2 user user 4096 Apr 24 06:37 Desktop
drwxr-xr-x 2 user user 4096 Apr 24 06:37 Documents
drwxr-xr-x 2 user user 4096 Apr 24 06:41 Downloads
drwxr-xr-x 2 user user 4096 Apr 24 06:37 Music
drwxr-xr-x 2 user user 4096 Apr 24 06:37 Pictures
drwxr-xr-x 2 user user 4096 Apr 24 06:37 Public
drwxr-xr-x 2 user user 4096 Apr 24 06:37 Templates
drwxr-xr-x 2 user user 4096 Apr 24 06:37 Videos
drwxrwxr-x 2 user user 4096 Apr 24 17:31 nas
drwx------ 9 user user 4096 Apr 24 09:00 snap
As you can see, not all directories are at the bottom. And the trailing / are only there in your u24 machine, so thatās where you need to check for an alias, which changes the output.
Also, just for kicks, you may want to check alias ls, for I had forgotten about this myself:
ls='command ls --color=auto -v'
The -v switch changes the sorting style, for instance.
It doesnāt have to be -v, there are plenty other switches to influence sorting.
But something added those trailing / for directories in your previous post:
Maybe ls is a wrapper function?
type ls
Itās my $TMPDIR, which I tend to use for this kind of demo stuff.
u24 had the -F in the alias which I removed (my paste was before, my mistake). u26 does not have the -F. For me, easy to notice .Xauthority is at the bottom (u24) but it is not in u26. Your setup is different, I explained how I noticed. I fail to see that uu ls -al is the same as the gnu ls -al
Nope, my setup is bog standard and I made sure to exclude aliases in the mix. Your initial output suffered from an alias. But that alias was missing on the 26.04 machine, I guess. Thatās why you noticed a difference.
There is --group-directories-first which does the directories before files listing.
I had to google ābog standardā, which means basic. As I explained, my u24 .bashrc is the same as the u26 .bashrc, the only difference being I removed the -F flag in alias ll=āls -alFā.
BTW, if you look closely, even the u26 output does not, in fact, have all dirs at the bottom. That might be some ls -alU output. -U essentially gives you the list sorted by inode number, because thatās what you get without explicitly sorting a dir listing.
Plus, you were comparing apples to oranges, because u26 doensāt have .ansible, for instance. And there are virtually no plain files in ~ on that one.
I did compare u24 bashrc and u26 bashrc ā same. My u26 listing /home/user, plain and simple is .Xauthority on top, then other dot files, then dirs. There is no -U flag
user@u26:~$ ls -al
total 104
drwxr-x--- 19 user user 4096 Apr 29 10:01 .
drwxr-xr-x 3 root root 4096 Apr 24 06:36 ..
-rw------- 1 user user 51 Apr 24 07:22 .Xauthority
-rw------- 1 user user 1651 Apr 29 07:23 .bash_history
-rw-r--r-- 1 user user 220 Feb 13 05:16 .bash_logout
-rw-r--r-- 1 user user 4484 Apr 29 07:54 .bashrc
drwx------ 15 user user 4096 Apr 24 07:22 .cache
drwx------ 15 user user 4096 Apr 24 06:50 .config
drwx------ 2 user user 4096 Apr 24 14:00 .gnupg
drwx------ 4 user user 4096 Apr 24 06:37 .local
drwx------ 9 user user 4096 Apr 29 06:21 .nx
-rw-r--r-- 1 user user 807 Feb 13 05:16 .profile
drwx------ 2 user user 4096 Apr 24 06:42 .qt
drwx------ 2 user user 4096 Apr 24 06:37 .ssh
-rw------- 1 user user 3151 Apr 29 07:54 .viminfo
drwxr-xr-x 2 user user 4096 Apr 24 06:37 Desktop
drwxr-xr-x 2 user user 4096 Apr 24 06:37 Documents
drwxr-xr-x 2 user user 4096 Apr 24 06:41 Downloads
drwxr-xr-x 2 user user 4096 Apr 24 06:37 Music
drwxr-xr-x 2 user user 4096 Apr 24 06:37 Pictures
drwxr-xr-x 2 user user 4096 Apr 24 06:37 Public
drwxr-xr-x 2 user user 4096 Apr 24 06:37 Templates
drwxr-xr-x 2 user user 4096 Apr 24 06:37 Videos
drwxrwxr-x 2 user user 4096 Apr 24 17:31 nas
drwx------ 9 user user 4096 Apr 24 09:00 snap
And how did .viminfo sneak in between the directories?
What youāre seeing is sorting by name, plain and simple. It just so happens that all non-dot files are directories; itās a fresh installation, after all.
Well, that explains the existence of ~/.viminfo, but not why it is mixed in with all the directories. Thatās how I realized that you are looking at a Fata Morgana. Your u24 listing does not put directories first. Itās just the sorting by name thatās doing it. And everthing that doesnāt start with . is a directory on u26, so it comes after the ādotā files anyway, which may be responsible for the initial assumption that all dirs came last.
This does not make much sense, as far a sorting goes:
Itās just the dots that are responsible for that order. And X < a makes the .Xauthority file come first.
added user pete to u26, got out of the gui, switched user to pete. Pop a terminal, prompt is pete@u26, no changes to any file. ls -al all dirs are on the bottom.
pete@u26:~$ ls -al
total 76
drwxr-x--- 16 pete pete 4096 Apr 29 11:08 .
drwxr-xr-x 4 root root 4096 Apr 29 11:04 ..
-rw-r--r-- 1 pete pete 220 Apr 29 11:04 .bash_logout
-rw-r--r-- 1 pete pete 3771 Apr 29 11:04 .bashrc
drwxr-x--- 13 pete pete 4096 Apr 29 11:09 .cache
drwx------ 12 pete pete 4096 Apr 29 11:09 .config
drwx------ 4 pete pete 4096 Apr 29 11:08 .local
drwx------ 8 pete pete 4096 Apr 29 11:08 .nx
-rw-r--r-- 1 pete pete 807 Apr 29 11:04 .profile
drwx------ 2 pete pete 4096 Apr 29 11:08 .qt
drwxr-xr-x 2 pete pete 4096 Apr 29 11:08 Desktop
drwxr-xr-x 2 pete pete 4096 Apr 29 11:08 Documents
drwxr-xr-x 2 pete pete 4096 Apr 29 11:08 Downloads
drwxr-xr-x 2 pete pete 4096 Apr 29 11:08 Music
drwxr-xr-x 2 pete pete 4096 Apr 29 11:08 Pictures
drwxr-xr-x 2 pete pete 4096 Apr 29 11:08 Public
drwxr-xr-x 2 pete pete 4096 Apr 29 11:08 Templates
drwxr-xr-x 2 pete pete 4096 Apr 29 11:08 Videos
drwx------ 4 pete pete 4096 Apr 29 11:06 snap