The Official Linux Thread

Macallik86

Superstar
Supporter
Joined
Dec 4, 2016
Messages
6,507
Reputation
1,372
Daps
21,227
Bricked my Winodws desktop trying to dual boot it lol. Legit spent 20+ hours over three days trying to resolve it. In retrospect, my desktop (created in 2011) was more prone to errors around dual booting, and so it eventually stopped reading my ssd/hdd. I was able to boot via jump drive, but could never get GRUB/systemd to kick in after the install.

I copped a 'new' refurb desktop for $155 and I have been dual booting Windows 11 & KDE Plasma (via Debian 12). The first few days were frustrating, NGL, but I finally found my groove within the last 24 hours or so. If you like tweaking all the settings in the apps you use, then KDE is the tool for you. Very power-user friendly, to the point that every keyboard shortcut can be edited. The customizablility is so wide-spread that it's easy to get overwhelmed at first.

I plan on reading the manual to get a deeper understanding of the non-intuitive stuff but will use it as my daily driver. I will keep Windows 11 for now, but it's my backup OS. It is clean AF too, but knowing how intrusive Microsoft is becoming encourages me to limit my interaction with it.
 

Macallik86

Superstar
Supporter
Joined
Dec 4, 2016
Messages
6,507
Reputation
1,372
Daps
21,227
Replace 'Ctrl+R' with atuin for better search + multi-device syncing of your CLI history
demo.gif
 

Macallik86

Superstar
Supporter
Joined
Dec 4, 2016
Messages
6,507
Reputation
1,372
Daps
21,227
Started using some of the modern refreshes of terminal staples recently. Held off for a while because it felt pointless to mess w/ a good thing, but the minor UX adjustments have been a nice change of pace:

nano -> micro
  • More modern keyboard shortcuts and along w/ mouse capabilities. Feels better to use Ctrl + C as copy, Ctrl + Q to exit, etc. It also has built in themes that you can adjust such as Github Dark/Light, Monokai, etc.
cat -> bat
  • Syntax highlighting out-of-the-box. Also has built in themes that you can adjust. Also executable as 'batcat' for for terminals that execute 'bat'.
ls -> exa
  • Similar functionality except it uses icons and utilizes color to delineate different file types better than ls.
 

Obreh Winfrey

Truly Brehthtaking
Supporter
Joined
Nov 18, 2016
Messages
20,852
Reputation
25,252
Daps
131,941
ls -> exa
  • Similar functionality except it uses icons and utilizes color to delineate different file types better than ls.
:jbhmm: may have to add this one to my personal environment setup script. You get hands on with neovim yet? I saw someone using it in a video and after customization it looked legit like an IDE, auto complete, file system tree, all the good stuff.
 

Macallik86

Superstar
Supporter
Joined
Dec 4, 2016
Messages
6,507
Reputation
1,372
Daps
21,227
:jbhmm: may have to add this one to my personal environment setup script. You get hands on with neovim yet? I saw someone using it in a video and after customization it looked legit like an IDE, auto complete, file system tree, all the good stuff.
Nah, I never had my interest piqued with vim/neovim. I think I came too late to Linux for that. To me, it is kind of like the software version of the qwerty keyboard: it's extremely familiar and many ppl swear by it, but it likely isn't the best UX if the creators had to rebuild it from the ground up.

On another note, I'm curious what else is on your personal env. setup script. I've (re)installed Debian like 10 times over the last few months (long story) and in order of importance, mines are nala, syncthing, atuin, kdeconnect and randomly enough, recently I've taken a liking to basic-ass curl thanks to cheat.sh and wttr.in
 

Obreh Winfrey

Truly Brehthtaking
Supporter
Joined
Nov 18, 2016
Messages
20,852
Reputation
25,252
Daps
131,941
Nah, I never had my interest piqued with vim/neovim. I think I came too late to Linux for that. To me, it is kind of like the software version of the qwerty keyboard: it's extremely familiar and many ppl swear by it, but it likely isn't the best UX if the creators had to rebuild it from the ground up.

On another note, I'm curious what else is on your personal env. setup script. I've (re)installed Debian like 10 times over the last few months (long story) and in order of importance, mines are nala, syncthing, atuin, kdeconnect and randomly enough, recently I've taken a liking to basic-ass curl thanks to cheat.sh and wttr.in
Code:
sudo apt install -y wget gpg curl gnupg lsb-release ca-certificates apt-transport-https vim git openjdk-17-jdk python3-pip build-essential python3-dev zsh maven gcc make perl

sudo snap install node --classic
sudo snap install code --classic
sudo snap install intellij-idea-community --classic
sudo snap install brave
sudo snap install docker

That's the bulk of it, and I also install Powerlevel 10k into ZSH. It requires a little bit of user interaction for the ZSH initialization, I haven't put a lot of effort into figuring it out. Using snap creates it's own set of problems so be aware of that.
 

↓R↑LYB

I trained Sheng Long and Shonuff
Joined
May 2, 2012
Messages
44,204
Reputation
13,743
Daps
171,152
Reppin
Pawgistan
Didn't even know there was a linux thread on here.

This thread is filled with a bunch of basement dwellers, neck beards, and mouth breathers :scust:
 

Macallik86

Superstar
Supporter
Joined
Dec 4, 2016
Messages
6,507
Reputation
1,372
Daps
21,227
I've had ongoing issues w/ a bash script triggering night mode and I'm too stubborn to download an app to do it for me. The issues I've experienced has taken hours of troubleshooting and current understanding is that cron's environment is basically empty, which makes sense from a script-running perspective but is a headache for user-specific variables. I've had trouble passing through user-related variables in order to interact w/ GUI apps, grabbing my DBUS session address, defining the $DISPLAY variable, etc.

I had an aha moment this week which lead me to finally pivot away from cron towards systemd starting today. Basically altho it remains to be seen, I believe that since systemd is more modern/has a deeper integration w/ the system, it likely passes through env. variables much more efficiently. That should sidestep all of the issues I'm experiencing hopefully.

I actually took a look @ systemd last year but it seemed so complex as a newbie just starting to daily drive linux. Today, while revisiting it with an fresh pair of eyes (and the man pages + a trusty online tutorial) I realize just how straightforward it is.

Also, along w/ being dope AF having everything tied into the other regular processes, you also get a great context on what is scheduled via systemctl list-timers --all and sudo systemctl status <insert name of the timer>.timer

Not only that, I found out that they have the equivalent of crontab.guru built into the system via systemd-analyze calendar

So for example, I can run the following:
systemd-analyze calendar --iterations=10 *-*-* 18..19:00/5:00
and then the output will be what time the script is scheduled to run for the next 10 triggers

Anyone else using cron/systemd timers? If so, what are you automating? My next task is to automate a backup script that pushes the .tar file to my server.
 

Obreh Winfrey

Truly Brehthtaking
Supporter
Joined
Nov 18, 2016
Messages
20,852
Reputation
25,252
Daps
131,941
I've had ongoing issues w/ a bash script triggering night mode and I'm too stubborn to download an app to do it for me. The issues I've experienced has taken hours of troubleshooting and current understanding is that cron's environment is basically empty, which makes sense from a script-running perspective but is a headache for user-specific variables. I've had trouble passing through user-related variables in order to interact w/ GUI apps, grabbing my DBUS session address, defining the $DISPLAY variable, etc.

I had an aha moment this week which lead me to finally pivot away from cron towards systemd starting today. Basically altho it remains to be seen, I believe that since systemd is more modern/has a deeper integration w/ the system, it likely passes through env. variables much more efficiently. That should sidestep all of the issues I'm experiencing hopefully.

I actually took a look @ systemd last year but it seemed so complex as a newbie just starting to daily drive linux. Today, while revisiting it with an fresh pair of eyes (and the man pages + a trusty online tutorial) I realize just how straightforward it is.

Also, along w/ being dope AF having everything tied into the other regular processes, you also get a great context on what is scheduled via systemctl list-timers --all and sudo systemctl status <insert name of the timer>.timer

Not only that, I found out that they have the equivalent of crontab.guru built into the system via systemd-analyze calendar

So for example, I can run the following:
systemd-analyze calendar --iterations=10 *-*-* 18..19:00/5:00
and then the output will be what time the script is scheduled to run for the next 10 triggers

Anyone else using cron/systemd timers? If so, what are you automating? My next task is to automate a backup script that pushes the .tar file to my server.
Consider using dot files to set up your environment before your script fully executes. In an old project at work that was one of the tricks used frequently, and I believe in tandem with crons. Essentially you have a script, let's say setupenv.sh, and it does the heavy lifting to set any variables you'd be using. Ours would populate credentials, parse the machines FQDN for specific info, update the PATH, etc. once you have that all worked out, then after the shebang in your cron script you do
. /path/to/setupenv.sh
Then follow with your normal contents. Dotting the file simply executes it, so it's a handy trick when you have to reuse some common things.
 
Last edited:

Macallik86

Superstar
Supporter
Joined
Dec 4, 2016
Messages
6,507
Reputation
1,372
Daps
21,227
I've got fzf across my server/laptop/desktop, but I only realized its power randomly today through a video. It's basically an interactive, real-time version of grep, so for example:
ls | fzf Lists files, but you can scroll and filter in real-time
cat file.txt | fzf Open a file but search as you type
cat $(fzf) Search for a file using fzf, and then once it's selected, open it using cat

'The man' wouldn't let me post this one (The website has a block on any rm -r f... I even had to use a space there, so here's a screenshot):
T399P8B.png





This is one of those ones where I realize it should be a staple of my terminal navigation and really is more efficient than the built-in options
 

Rice N Beans

Junior Hayley Stan
Supporter
Joined
May 5, 2012
Messages
10,804
Reputation
1,447
Daps
22,398
Reppin
Chicago, IL
Anyone else using cron/systemd timers? If so, what are you automating? My next task is to automate a backup script that pushes the .tar file to my server.

I had a simple cron job to restart dnsmasq on my router way back. Can't remember why exactly but it was linked to the ISP having problems and forcing connectivity via the restart was keeping things alive.
 
Top