LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   General (https://www.linuxquestions.org/questions/general-10/)
-   -   What is something new that you have learned about Linux this week? (https://www.linuxquestions.org/questions/general-10/what-is-something-new-that-you-have-learned-about-linux-this-week-4175680314/)

KGIII 08-12-2020 12:16 PM

What is something new that you have learned about Linux this week?
 
It may seem trivial - and it is, but I realized I could use bash alias profiles by simply loading different alias sources.

In other words, I have /.bash_aliases & /.bash_aliases2 and they can be loaded with `source /.bash_alias*` as needed.

Sure, it seems trivial - but I previously was unaware of this. It made me pretty happy to discover this, even though I seldom bother switching between them.

So, however trivial, what's something new that you learned about Linux in the past 7 days?

Note: I think this would make a great idea for a weekly/recurring thread, but I really doubt I've got the motivation to keep it going long-term. We'll see how it goes!

sgosnell 08-12-2020 07:33 PM

I learned that the Debian live dvd is very, very good. I've used the netinstall version for years, and for awhile the live version went away, but when I ran the newest version to fix some drive problems, it just worked, no settings to figure out, nothing. It came online without needing to think about networking. I was very pleasantly surprised.

I also learned some things about logical volume management. It might not be as bad as it seemed.

frankbell 08-12-2020 07:51 PM

I learned that Endeavor Linux, which is based on Arch, is a very nice job of work.

fido_dogstoyevsky 08-13-2020 04:56 AM

About 15 minutes ago I (re)learned that I can look for a solution to a problem on the web, impatiently give up searching and instead look for a promisingly named config file - and get my answer as soon as I open it.

I don't know whether I should be more embarrassed at giving up on the web too easily, or for not going straight for the .X Files.

rtmistler 08-13-2020 12:10 PM

I learned that there's a distro I can't run as a VM. And I feel it's because of me, nothing to do with the distro. Still researching my dim-witted-ness. ;) Because if I have to write an actual thread question for it, when many others already can do it, then that's pathetic. (My signature, "Never give up, never surrender!!")

smallpond 08-13-2020 01:02 PM

I've been logging into a Ubuntu box with ssh and starting the VNC server. I finally wrote an upstart conf file so I don't need to do that anymore. I keep forgetting that any repetitive task can be automated pretty easily.

Linux is so customizable that it starts out hard, but gets less annoying the longer you use it. Its the opposite of Windows.

KGIII 08-13-2020 03:47 PM

Today, I relearned a lesson. Sometimes you waste too much time looking for an elegant solution and never find it. Sometimes, a heavy-handed kludge is the only way.

I've learned this lesson before - but I've never learned when it mattered.

In another thread, I tried all the tips, tricks, tweaks, and terminal incarnations. In the end, none of them worked. So, I just installed the file manager that I'm used to and made the change with that. It's a kludge but it works. It lacks elegance, but it does have simplicity. That's nice, as it has that going for it.

Should I remember, I'll make another one of these threads next Wednesday. I'm *very* confident that I'll have learned some more new stuff in that amount of time.

ondoho 08-14-2020 02:03 AM

I'm learning to appreciate coreutils.
For years I tried to use only bash builtins in my scripts.
Imagine the amount of code required to emulate something like
Code:

echo some output | shuf

KGIII 08-14-2020 03:21 PM

I'd never used 'shuf' for anything - and it does exactly what I suspected it'd do. I've just never had any need for it.

While making sure that it did shuffle stuff (and then learning about 'sort -R') I bumped into this page:

https://en.wikipedia.org/wiki/List_o...ities_commands

There are quite a few that I'd never used before. I've read a ton of Linux books, but haven't actually memorized 'em.

ondoho 08-15-2020 05:30 AM

Glorious coreutils. A dream come true for practical everyday coding. "Do one thing and do it well".
That, and the pipe: "Do one thing well and pipe it into another thing that does it well."

But sometimes I write scripts that perform complex tasks often, regularly and automatically; that's when I try to avoid pipes and rather rely on the power of bash.

Turbocapitalist 08-15-2020 06:08 AM

It's not specific to GNU/Linux per se but I've really increased my interactive use of tmux shortcuts. ctrl-b % or ctrl-b " to split a window into panes, for example, and then ctrl-b up-arrow or ctrl-b down-arrow to resize the panes. I've also been renaming sessions, windows, and even panes a lot very recently thus making use of the -t option for many tmux commands. However for those I don't use any of the shortcuts (if there are any) but instead just write something in the shell.

Once I find myself setting up a similar arrangement repeatedly I script it , but that part is not new. I suppose I should learn to deal with .tmux.conf too, someday. Here is one of the scripts:

Code:

#!/bin/sh

PATH=/bin:/usr/bin:/usr/local/bin

set -e

tmux attach-session  -t sensors -d && exit || tmux new-session -s sensors -d
tmux split-window -v -t sensors:0 -l 5
tmux split-window -v -t sensors:0 -l 5
tmux select-layout even-vertical
tmux split-window -h -t sensors:0.1

tmux select-pane -t sensors:0.0

tmux resize-pane -t sensors:0.0 -y 10
tmux resize-pane -t sensors:0.3 -y 5

tmux send-keys -t sensors:0.2 "mosquitto_sub -v -h xx.yy.zz.aa \
        -u sensors -P 'xxxxxxxx' \
        --key /etc/mosquitto/certs/sensors-client.key \
        --cert /etc/mosquitto/certs/sensors-client.crt \
        --cafile /etc/mosquitto/certs/sensors-server.crt \
        -t 'readings' -p 8883 --tls-version tlsv1.2 -I local" C-m

tmux send-keys -t sensors:0.1 "sqlite3 /home/r/data/readings.sqlite3" C-m

tmux attach-session -t sensors

There seems to be a little bit of varition in the behavior of the split-window command depending on the version of tmux though.

KGIII 08-15-2020 10:01 AM

It's amazing to see how much some of y'all know. I have been using Linux for years - and Unix before that. Much of my career was with Sun, using Solaris (and even SunOS before that). Alas, our workstations ended up being mostly Microsoft (for myriad reasons that made logistical sense at the time) and I didn't return to regularly using Linux until the mid-2000s.

I'm pretty sure that I spent too much time learning distros and not enough time learning Linux. I've read I don't know how many books, but don't retain it all that well unless it's something that gets regular use. So, it's fun to see how much other people know.

individual 08-15-2020 05:02 PM

Quote:

Originally Posted by ondoho (Post 6155734)
I'm learning to appreciate coreutils.
For years I tried to use only bash builtins in my scripts.
Imagine the amount of code required to emulate something like
Code:

echo some output | shuf

And the great thing is--at least in the case of the GNU coreutils--they're optimized for speed, which is very useful.

enorbet 08-16-2020 09:24 AM

Today I learned that the Pine64 Linux Phone has made dramatic leaps forward and becoming far more than a toy for devs. They make calls, still have hardware switches, and currently can run with 17 different Linux distributions.

ondoho 08-17-2020 02:05 PM

Quote:

Originally Posted by enorbet (Post 6156484)
dramatic leaps ... They make calls

It's supposed to be a phone, isn't it.
What's that, 1.5 years after the announced release? 3 years after making wordy promises, and pulling lots of money out of lots of pockets?
:SMH:


All times are GMT -5. The time now is 06:56 PM.