What is something *new* you have learned about Linux within the past 7 days?
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I just learned that ZSH comes with a directory changer called "cdr", which keeps a persistent history of your visited directories and lets you change to directories in that history. It's in the "zshcontrib" manpage, which gives you three lines to set it up.
Now I'm wondering how any of the people who wrote similar projects (fasd, autojump, z, and all their clones and reimplementations) didn't know about this.
I think bash can do this too if you use pushd rather than cd. You get a stack of directories and you can go back up them using popd.
Based on this thread, here's a sticky for you to highlight something you've learned about Linux in the last 7 days. This is a great way to learn from follow LQ members and share what you've recently learned.
Hat tip to @KGIII for starting the original thread.
--jeremy
my computer COULD boot Debian, it was just not configured right.
This is helpful when, for example, you need to unmount a volume but there's
something still using it.
My use case is I wanted to resize my /var/ partition. In order to do that I
need to unmount it first, but too many processes were reading and writing
to /var/. umount /var/ prints a helpful message about using either lsof or
fuser to find out about those processes. Reading the manpage of fuser
revealed the -k and -v options which are very heplful.
I decided I'd drop to runlevel 1 to stop all the processes at once, unmount
the partition, and resize it, but even after dropping to runlevel 1 there
was still the same error message from umount (resource busy), fuser showed
that mysqld was still active at runlevel 1 [is this normal btw ?].
Yeah, I would ask how to kill root trying to unmount still in use volumes. God's intervention required I guess.
Rather poor joke. Just your situation is very unique. Myself for purpose like to resize partition I always use live system. So there there is no risk any process is actually using hard drive. Even swap on hard drive is disabled. My trust in Linux is great but not endless.
You can also go back to the last directory you were in with 'cd -' which is handy if you need to flip/flop between two locations repeatedly.
This is something I only discovered recently, despite having used 'cd' for well over 25 years.
Learned this recently, as well.
In the same vane with cd, is setting up parent aliases. For instance, whereas you normally would type 'cd ..' to traverse to parent, you can create an alias called '..'. As well, you can set up an alias for 'cd ../..' as '...' to traverse 2 parent directories, or '....' to traverse 3 parent directories. So on, and so forth. Could be useful to someone who's truly interested in minimizing bash keystrokes.
When I learn something new in Linux, I keep it to myself, because I assume most LQ members already know it perfectly well.
I see you've been a member here almost as long as I have. And I think we could probably agree that the climate on LQ has changed rather drastically since the early days. I see a much more positive response to newbie posts. I guess elitism has fallen out of vogue, which is fine with me.
As long as I've tinkered with Linux, there are still simple new things I pick up here and there that would probably be considered widely known. Heck, it wasn't until just this year I finally got an amateur grasp on sed and awk. It's rare that I need these as a desktop Linux user, and it took someone explaining them layman for me to get it.
Threads like this one are a pretty good way to propagate your (new) knowledge. If you didn't know it, that means someone else didn't either. I'm slowly reading through it to see if there's something new for me to gleam.
I also learned about dmidecode, which provides much more detailed hardware information than the ls*** commands. I use it to derive system information for display in conky. Since dmidecode requires sudo, I had to learn more about the sudoers configuration file, add it with nopasswd so that it works with conky.
I see you've been a member here almost as long as I have. And I think we could probably agree that the climate on LQ has changed rather drastically since the early days. I see a much more positive response to newbie posts. I guess elitism has fallen out of vogue, which is fine with me.
As long as I've tinkered with Linux, there are still simple new things I pick up here and there that would probably be considered widely known. Heck, it wasn't until just this year I finally got an amateur grasp on sed and awk. It's rare that I need these as a desktop Linux user, and it took someone explaining them layman for me to get it.
Threads like this one are a pretty good way to propagate your (new) knowledge. If you didn't know it, that means someone else didn't either. I'm slowly reading through it to see if there's something new for me to gleam.
I must acknowledge that, without taking the time to broadly look at recent posts and compare them to old posts, I sense you're right. I have long since noted to myself that I haven't seen the individual who said "ooo this noob bites back" in years. Members like him/her are why my username is "newbiesforever" is the first place.
What I note now is that no one, you or anyone else, has so far commented to tell me I'm wrong to keep my "knowledge" to myself on the reasonable assumption that most people already know it. (That was another learned reaction to this alleged elitism.)
I also like this thread in principle. The only thing "wrong" with it is the inherent and unsolvable limitation of threads that continue for months: too long. Of course I haven't read it all, and to do so, I would have to budget time. Perhaps some weekend.
Last edited by newbiesforever; 10-14-2021 at 07:54 AM.
What I note now is that no one, you or anyone else, has so far commented to tell me I'm wrong to keep my "knowledge" to myself on the reasonable assumption that most people already know it.
Whether or not you contribute is your personal choice. I'm not about to wade in on that choice one way or the other. All I'll say is you'd be surprised at how much I don't know: we all have our areas of expertise, and our weak-spots.
Yesterday I learned /etc/hosts.allow and /etc/hosts.deny are (optionally) respected by sshd and other daemons.
When I first started learning Linux+GNU, tcpwrappers was a separate executable, like inetd. Secure, but inefficient compared with self contained daemons.
Yesterday I decided to firewall some bots that were trying to brute force my sshd, and found a bunch of howtos recommending /etc/hosts.deny /etc/hosts.allow, the config files for tcpwrappers. But they didn't mention tcpwrappers. So I dug into manpages I hadn't looked at for a long time.
ldd /usr/sbin/sshd shows the sshd in Debian was compiled with libwrap.
Yesterday I decided to firewall some bots that were trying to brute force my sshd, and found a bunch of howtos recommending /etc/hosts.deny /etc/hosts.allow, the config files for tcpwrappers. But they didn't mention tcpwrappers. So I dug into manpages I hadn't looked at for a long time.
Those, like the FTP-oriented tutorials, just seem to have the longest tails and just won't disappear no matter how outdated they become. Everything that tcpwrappers could do can be done more efficiently with nftables (formerly iptables) and / or sshd_config itself since more than a decade ago. I see the man page for hosts_access(5) even in the latest Ubuntu (Impish) and Devuan testing (Daedalus) and that those /etc/hosts.[allow|deny] files are still obeyed by sshd in both distros. So, today I learned that tcpwrappers may still be around. :P
The other day, I learned that cat can be used in place of dd in many situations. One example is when writing a Live image to a USB stick. Like with most things, I hope I can recall it the next time I need to do that. However both are dangerous when used that way, one can easily type the wrong destination in either.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.