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.
Upgrades occasionally land 'jammy side up!' I know this flies in the face of Murphy's Laws, Sod's law and a large number of long established Natural laws, but it just happened to me.
I upgraded Slackware64 from Current 2020-09-28(iso) release to Current-2021-02-11(iso) release and noted the long list of long notes in ChangeLog.txt. I didn't update config files except for grub; I reused the same /home and rebooted and everything worked. Everything was found, network, IP, my 2 screens, etc. I was left a few small tidying jobs in the preferences of the XFCE but that was 10 minutes when I felt like doing it.
I did have one earlier disaster on a previous effort but elegantly reversed out out of that dead end by realizing the situation and restoring a backup, but that was my fault entirely.
Upgrades occasionally land 'jammy side up!' I know this flies in the face of Murphy's Laws, Sod's law and a large number of long established Natural laws, but it just happened to me.
I upgraded Slackware64 from Current 2020-09-28(iso) release to Current-2021-02-11(iso) release and noted the long list of long notes in ChangeLog.txt. I didn't update config files except for grub; I reused the same /home and rebooted and everything worked. Everything was found, network, IP, my 2 screens, etc. I was left a few small tidying jobs in the preferences of the XFCE but that was 10 minutes when I felt like doing it.
I did have one earlier disaster on a previous effort but elegantly reversed out out of that dead end by realizing the situation and restoring a backup, but that was my fault entirely.
God I am too used to Debian's method if that is unusual. I just did an upgrade to Buster from the previous Stretch OS, as usual the apt dist-upgrade went without problems and everything worked out of the box without an edit like it has in the near twenty years of doing it with them. Oh it replaced a couple of config files on me, since I did not edit them I let the maintainers version get installed.
God I am too used to Debian's method if that is unusual. I just did an upgrade to Buster from the previous Stretch OS, as usual the apt dist-upgrade went without problems and everything worked out of the box without an edit like it has in the near twenty years of doing it with them. Oh it replaced a couple of config files on me, since I did not edit them I let the maintainers version get installed.
Ah yeah, but a lot of slackers are disappointed if there's nothing to do! Besides, I know the kind of update you're talking about. Make the least mistake and they go very very wrong.
Ah yeah, but a lot of slackers are disappointed if there's nothing to do! Besides, I know the kind of update you're talking about. Make the least mistake and they go very very wrong.
No mistakes to make the command does everything needed to upgrade you from one version of the OS to another, I suppose if stupid enough not to take the new configurations offered it could be a bad result, but why would you if you never edited the file. I will let those who know what they are doing provide the sensible defaults they most always do that give you a working service on the system. For something like SAB newsreader I have to edit the configuration of it to tell it the user to run as, those are the only things needed and that file was not touched on this upgrade, it fired up just like usual.
Make the least mistake and they go very very wrong.
Debian release notes usually devote a full chapter to upgrades from the previous version. Whoever not follows the steps outlined there are only themselves to blame.
Slackware-Current has slackpkg to keep you on the bleeding edge. Personally, I'm not fond of bleeding edge, because of the blood loss. I want my box to be boring & reliable,not a crashtesting box.
'Ctrl + L' doesn't clear the terminal screen; It just scrolls down to a new frame where you can't see the previous output.
You are absolutely right.
While 'Ctrl + L' visually clears the screen, it also allows you to scroll up and see the previous terminal output.
In contrary 'clear' command clears the screen and you can't scroll up, effectively disappearing the previous output.
If someone doesn't have any specific reason to use 'clear' command, then 'Ctrl + L' is simply faster thus more convenient.
I discovered what a useful command adduser is. Not every distro has an adduser script but it's worth using when it's there. Previously I always used useradd to create a user and I always missed out some argument or other and had to come along after myself and fix the missing bit. adduser takes you through the process in stages so that the new user gets everything they need.
I discovered what a useful command adduser is. Not every distro has an adduser script but it's worth using when it's there. Previously I always used useradd to create a user and I always missed out some argument or other and had to come along after myself and fix the missing bit. adduser takes you through the process in stages so that the new user gets everything they need.
And there is one I just learned few weeks ago when asking why the useradd in thread and not adduser, I stay away from that useradd like the plague after too many bad experiences like that, only to learn not all distros have clued in and have such a damn useful command. Mine for this week was learning the efibootmgr command to add new entry to my backup machines EFI boot menu, did that one last night.
Last edited by HappyTux; 02-23-2021 at 11:19 AM.
Reason: typo
I've learned if I set the variable in the command:
$ my_name=Gemu
echo "hello to $my_name"
echo responds hello to Gemu
These are called variables. I'm going through a bash scripting course on the net, not an actual class just self study.
My first dealing with bash scripting was with grub2. I had to learn at least some of it to make menuentry's work sometimes trying to boot many different Operating systems. Now usb creators will make darn near anything boot in a few minutes where a few years ago you had to figure it all out except for what you could get from the CD's isolinux/isolinux.cfg.
^ GRUB uses some sort of shell, but I'm pretty sure it's not bash.
Quote:
Originally Posted by SkarmoutsosV
While 'Ctrl + L' visually clears the screen, it also allows you to scroll up and see the previous terminal output.
In contrary 'clear' command clears the screen and you can't scroll up, effectively disappearing the previous output.
If someone doesn't have any specific reason to use 'clear' command, then 'Ctrl + L' is simply faster thus more convenient.
Whether I use Ctrl-L or clear, I can't reproduce this on either urxvt or xterm.
I'm sure this is configurable and depends on many factors, but as it is on my system, scrolling up (both with the mouse and Shift-Up) after clearing just shows one additional line, and not the previous screen.
^ GRUB uses some sort of shell, but I'm pretty sure it's not bash.
No, it's an intrinsic part of GRUB, contained in one of its modules. But it's obviously based on the Bourne shell so you could call it a bash cousin.
gemu, I warn you! Scripting is addictive like any kind of programming. Now, just for interest, try doing the same thing but using single quotes. You'll find that it doesn't work any more because single quotes nullify all special characters.
No, it's an intrinsic part of GRUB, contained in one of its modules. But it's obviously based on the Bourne shell so you could call it a bash cousin.
gemu, I warn you! Scripting is addictive like any kind of programming. Now, just for interest, try doing the same thing but using single quotes. You'll find that it doesn't work any more because single quotes nullify all special characters.
Ok I'll try that. Thanks!
I've been looking for which shell grub actually uses and I found some info here. https://help.ubuntu.com/community/Grub2
------------------------------------------
Grub 2's major improvements over grub legacy
1. it offers Script support including conditional statements and functions.
So I don't know if grub2 can handle every command known to bash but the 1st 152 lines of my Ubuntu's grub.cfg is a bunch of: if, then, else, elif, echo and done statements.
The very 1st thing in my grub.cfg is an if condition like this, I won't post them all, there's too many. Even the menuentry has if statements now, most complex I've ever seen.
if [ -s $prefix/grubenv ]; then
set have_grubenv=true
load_env
fi
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.