Linux - Reddit – Telegram
Linux - Reddit
763 subscribers
4.19K photos
207 videos
39.9K links
Stay up-to-date with everything Linux!
Content directly fetched from the subreddit just for you.

Powered by : @r_channels
Download Telegram
Change kernels often? Natively booting via UEFI?

A while ago I gave up on grub and starting booting natively using UEFI and my BIOS. This has worked well, but I often change kernels and I needed a way to easily boot a different kernel by default. I used to do this by reviewing the entries from efibootmgr and manually updating them, but this was cumbersome and error prone. Well, not any more:

```
$ sudo Scripts/efibootset

Current EFI boot order

1) Boot0009 - Void Linux with kernel 6.15.9_1
2) Boot0008 - Void Linux with kernel 6.15.4_1 [Currently booted]
3) Boot0007 - Void Linux with kernel 6.12.41_1
4) Boot0002 - Void Linux with kernel 6.12.40_1
5) Boot0006 - Void Linux with kernel 6.15.7_1
6) Boot0000 - debian
7) Boot0001 - Linux-Firmware-Updater

Enter number to boot first or press Enter to use current:

Current
BootOrder: 0009,0008,0007,0002,0006,0000,0010,0011,0012,0013,0014,0015,0016,0017,0018,0019,001C,0020,001E,001F,0021,001D,0022,0023,0024,0025,0001

New
BootOrder: 0008,0009,0007,0002,0006,0000,0010,0011,0012,0013,0014,0015,0016,0017,0018,0019,001C,0020,001E,001F,0021,001D,0022,0023,0024,0025,0001

New EFI boot order

1) Boot0008 - Void Linux with kernel 6.15.4_1 [Currently booted]
2) Boot0009 - Void Linux with kernel 6.15.9_1
3) Boot0007 - Void Linux with kernel 6.12.41_1
4) Boot0002 - Void Linux with kernel 6.12.40_1
5) Boot0006 - Void Linux with kernel 6.15.7_1
6) Boot0000 - debian
7) Boot0001 - Linux-Firmware-Updater
```

Here is the code. While I'm a bit new to this, happy to take improvements and feedback.

Cheers.

```
#!/bin/bash

if ! command -v efibootmgr &> /dev/null; then
echo "This noscript requires efibootmgr; please install it and try again."
exit 1
fi

if (( $EUID != 0 )); then
echo "This noscript requires root."
exit 1
fi

while getopts d opt; do
case $opt in
d) set -x;;
esac
done

oIFS=$IFS

# Store efibootmgr output
efibootdata=$(efibootmgr)

# Parse efibootmgr output
parse() {
IFS='#'
i=0

while read -r order_label loader; do
# Get current boot entry
if [[ "X$order_label" = XBootCurrent* ]]; then
current="${order_label:13}"
fi

# Get boot order
if [[ "X$order_label" = XBootOrder* ]]; then
boot_order="${order_label:11}"
fi

# Grab the entries that are on the disk
# If the loader begins with a parenthesis, assume this is an entry we modified and process it
# Need to use double brackets here or this doesn't work
if [[ "X$loader" = X\(* ]]; then
order[$i]="${order_label:4:4}"
label[$i]="${order_label:10}"
((i++))
fi
# Replace all instances of HD with a hash as IFS can only work with single characters
done < <(echo $efibootdata | sed -e 's/HD/#/g')
}

# Display boot entries in order and store them
display() {
printf "\n%s\n\n" "$1 EFI boot order"

IFS=' ,'
n=1
# echo boot_order is $boot_order
for entry in $boot_order; do
# Find the matching entry
# This won't work as bash will not readily do the variable expansion first
# for e in {0..$i}; do
# If we don't note a space here, seq will use a new line and this will break
for e in $(seq -s ' ' 0 $i); do
# for (( e=$i; e>=0; e-- )); do
if [[ "X$entry" = X${order[$e]} ]]; then
# echo ${label[$e]}
if [[ "X$current" = X${order[$e]} ]]; then
printf "%2d) %s - %s\n" $n Boot${order[$e]} "${label[$e]}[Currently booted]"
# Update current to reflect number of currently booted
current=$n
else
# Need parentheses at the end as it could contain spaces
printf "%2d) %s - %s\n" $n Boot${order[$e]} "${label[$e]}"
fi
number_order[$n]=${order[$e]}
((n++))
break
fi
done
done
}

parse
display Current

# Insert blank line
echo

# Update boot entries
reorder() {
# Do nothing if the selected boot entry is the first entry
if [[ "X$1" = X1 ]]; then
printf "\n%s\n" "Selected boot entry is already the first entry; no changes made."
IFS=$oIFS
exit 0
fi

# Create new BootOrder
new_order=${number_order[$1]}
for i in $boot_order; do
if [[ "X$i" != X${number_order[$1]} ]]; then
new_order+=",$i"
fi
done

# Need to
restore this so BootOrder can have commas
IFS=$oIFS
printf "\n%s\n%s\n" "Current" "BootOrder: $boot_order"
printf "\n%s\n%s\n" "New" "BootOrder: $new_order"

# Update boot
efibootdata=$(efibootmgr -o $new_order)
parse
display New
}

# Check for valid boot entry
entry_exists() {
if (( $1 >= 1 && $1 <= $n-1 )); then
# Return true
return 0
else
# Return false
return 1
fi
}

# Get boot entry
select_entry() {
# When this is used with command substitution we never see it
# printf "\n%s" "Enter number to boot first or press Enter to use current: "
read -p "Enter number to boot first or press Enter to use current: " s
case $s in
# Enter pressed
"")
echo $current
;;
# Single digit
[1-9])
if entry_exists $s; then
echo $s
else
echo 0
fi
;;
# Double digits
[1-9][0-9])
if entry_exists $s; then
echo $s
else
echo 0
fi
;;
*)
echo 0
;;
esac
}

# Get new selection if invalid and update boot order if valid
verify() {
case $1 in
0)
printf "\n%s\n" "Invalid selection"
verify $(select_entry)
;;
*)
# Update boot entries
reorder $1
;;
esac
}

verify $(select_entry)

IFS=$oIFS
```

https://redd.it/1mlatzv
@r_linux
sshPilot 2.0 released with tunelling support and more

Main window

sshPilot is a desktop application for managing SSH connections. It loads/saves standard .ssh/config entries and make it easy to manage multiple servers.

It fully supports dynamic, remote and local port forwarding, key-pair generation, file transfer to remote machines and more.

Fetures:

- Load/save standard .ssh/config entries (it loads you current configuration)
- Tabbed interface
- Full support for Local, Remote and Dynamic port forwarding
- Intuitive, minimal UI with keyboard navigation and shortcuts: Press ctrl+L to quickly switch between hosts, close tabs with ctrl+w and move between tabs with alt+right/left arrow
- SCP support for quickly uploading a file to remote server
- Generate keypairs and add them to remote servers
- Toggle to show/hide ip addresses/hostnames in main UI
- Light/Dark themes
- Customizable terminal font and color schemes
- Free software (GPL v3 license)

The app is currently distributed as a debian package and can be installed on recent versions of Debian (testing/unstable) and ubuntu. Debian bookworm is not supported due to older libadwaita version.

Latest release can be downloaded from here: https://github.com/mfat/sshpilot/releases/

You can also run the app from source. Install the modules listed in requirements.txt and a fairly recent version of GNOME and it should run.

A Flatpak and an RPM version are also planned for future.

I'm also looking for a volunteer to design a good icon for the app.

I'd highly appreciate your thoughts/feedback on this.

https://redd.it/1ml9qpf
@r_linux
Thinkpad T14 gen 2 Fedora 42 kde
https://redd.it/1mlcz9g
@r_linux
What's the best offline capable information resource on linux?

I was thinking about how wikipedia lets you download the whole site as a html file. Is there anything like that for information on linux?

This is perhaps becoming more meaningful in a world where corporate and governmental powers are gaining further and further control over the internet, and climate change is also threatening data centres, particularly in terms of the water requirements.

https://redd.it/1mlc2fi
@r_linux
More distros should take notes from NixOS's installer's desktop choice screen.
https://redd.it/1mlkfy8
@r_linux
LINUX market share surpasses %6 and how mainstream distros ratio is:
https://redd.it/1mlluen
@r_linux
Used to be a Linux hater. Just spent 19 hours getting my sound system to work on Windows. never again

Windows has fucked me ripe in the ass for almost 20 years. I'm never using it ever again except for gaming. I have never been so annoyed. I just spent many hours trying to hook an aux device and I couldn't do it because Windows refused. I plugged the aux into my phone and it instantly worked flawlessly. Linux here I come

https://redd.it/1mllfbo
@r_linux
A screenshot from year 2008 of Manux, a discontinued Indonesian-based distro. You could find this be installed in some internet cafe back in the day.
https://redd.it/1mlmwid
@r_linux
Made my own GNU/Linux distro! ObsidianOS
https://redd.it/1mluiwx
@r_linux
Built Updo, a CLI website monitoring tool because I got tired of web dashboards
https://redd.it/1mlvnwz
@r_linux
Debian 13 released!

https://www.debian.org/News/2025/20250809

Debian 13 is released. I never seen many users waiting for a new released. Hope it will be stable and secure.

I read some days ago about the release date and many users started upgrade and install the release using rc installer before official release!

Happy Debian release!

https://redd.it/1mm01fz
@r_linux
Linux is one of the best gaming platforms right now

It’s not perfect, sure (anti-cheat is still a pain in the ass) - but the problem is, people keep comparing it to Windows, which obviously has a way bigger market share and way more years of direct support from devs and companies.

Comparisons can be useful for pushing Linux gaming forward, but they can also make us forget how far it’s already come.

And honestly, in 2025, Linux is a very mature gaming platform:

Drivers are constantly improving, and if you’re on AMD or Intel, you don’t even need to install them manually - just plug in your controller and play.
There are over 21,000 games available on the biggest gaming store - Steam (straight from your distro’s store) with cloud saves, automatic updates, and free online play.
Epic, GOG, or Amazon games? Install Heroic (also in your store) and you’re set.
Retro gaming? You’ve got emulators for pretty much anything - PS1, PS2, PS3, GameCube, SNES, Xbox, you name it - all right there in your distro's store.
Steam Deck, SteamOS.
DXVK, VKD3D, Vulkan and Proton are improving all the time.
And also tools like MangoHud for hardware info.
There are even distros made just for gaming, like Bazzite.

Even some big tech influencers are making videos about Linux gaming now. So Basically… gaming on Linux in 2025 is awesome. And I just love how good it has become.

EDIT: Some people here are misunderstanding the point of this post. It’s meant to be a celebration of what Linux is right now as a gaming platform - and it’s actually a very good one. At no point am I saying it’s better than Windows or making any direct comparisons. Like I said in the post:

"Comparisons can be useful for pushing Linux gaming forward, but they can also make us forget how far it’s already come."

https://redd.it/1mm589f
@r_linux