SlackwareThis Forum is for the discussion of Slackware Linux.
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.
OK...so eventually (probably a long time from now) I could "forge" my own Slackware, right? That explains why the family trees of Linux are insane. Wow, I guess that means understanding kernels and shells. Probably won't go down that rabbit hole yet lol. The man pages are really helpful. The Slackbook is also helpful. So in the CLI or Terminal Console, BASH is the default shell right?
Funny story: Was talking to another classmate about Linux, and he asked what distro I was trying out. I told him Slackware, and he was like "WTF? Why on earth would you use that?" I replied, "Because it's challenging, and doesn't hold your hand?" I then said, "Let me guess, you use Ubuntu, right?" I think we know the rest of this story. ^_^ I'm sure Ubuntu is great nothing against it, but I need something that's going to really teach me the rich history of Linux ya know?
OK...so eventually (probably a long time from now) I could "forge" my own Slackware, right? That explains why the family trees of Linux are insane. Wow, I guess that means understanding kernels and shells.
All Linux distros use basically the same kernel. Different versions and different build parameters but it's the same program. That program is the only one that's actually called Linux (it's named after its creator).
Where distros differ is in their userspace software. They have different package managers, different default desktops and so on. And different philosophies of course. As well as the Expert-Novice axis, there are also differences between bleeding edge, continuously updated distros and stable ones with point releases. There are even some distros that distribute source code rather than binaries.
Quote:
So in the CLI or Terminal Console, BASH is the default shell right?
Nearly always, yes. Gentoo used to use zsh but I don't know if it still does.
Quote:
-Learning VIM for future C Programming and Python. (I'm kind of glad I waited later in life to start learning this. I haven't developed any habits at all, so thank god I found VIM first. The thing about these editors is NO MOUSE TOUCHING. Super productive.)
Don't be such a snob! There's nothing wrong with using a mouse in moderation. vim has so many commands, I doubt if anyone can remember them all. I certainly can't! I prefer gvim, which has all the power of vim but also ancillary menu and tool bars.
For programming, I use geany. It has syntax colouring like vim (like most Linux editors in fact) but it also has function name completion and you can have multiple files open side by side. That's very useful in C. You can also fold the code display to bring more distant parts of a file together for comparison. There are even limited build facilities, though it isn't really an IDE. A feature that I particularly like is that when you launch it, it comes up with the contents it had when you last shut it down.
Don't be such a snob! There's nothing wrong with using a mouse in moderation. vim has so many commands, I doubt if anyone can remember them all. I certainly can't! I prefer gvim, which has all the power of vim but also ancillary menu and tool bars.
For programming, I use geany. It has syntax colouring like vim (like most Linux editors in fact) but it also has function name completion and you can have multiple files open side by side. That's very useful in C. You can also fold the code display to bring more distant parts of a file together for comparison. There are even limited build facilities, though it isn't really an IDE. A feature that I particularly like is that when you launch it, it comes up with the contents it had when you last shut it down.
LOL!...sorry hazel I didn't meant to come off snooty! :-D I probably won't even start programming right now, because I'm still learning the file systems and stuff like that. I think I was mainly thinking out loud, and was maybe getting ahead of myself. It's so fun learning Linux! I wish I would have used Linux earlier in life, but I think the main thing that always strayed me away was compatibility with PC gaming. Now that I have put gaming aside to improve my lifestyle and gain skills, I realize I should have done that a LONG time ago. I'll definitely check out few different editors like geany. I've got a few No Starch Press books on command line and learning Linux as an OS. I think for me, learning the fundamentals is paramount. Thanks for the feedback!
Is there a way to permanently put dircolors on the bash for ls command with out typing --col? I have a screen shot to show what I mean. The middle terminal is the one I tried configuring. It's not a big deal, but it would make learning filesystems a lot faster for me. I probably shouldn't mess with these things yet, since I'm just randomly trying things out. Thanks slackers!!!
UPDATE: Nevermind I used an alias instead.
-ul7
Last edited by ul7; 09-04-2020 at 12:41 PM.
Reason: I used the alias command to change "ls" to "ls --color"
Is there a way to permanently put dircolors on the bash for ls command with out typing --col? I have a screen shot to show what I mean. The middle terminal is the one I tried configuring. It's not a big deal, but it would make learning filesystems a lot faster for me. I probably shouldn't mess with these things yet, since I'm just randomly trying things out. Thanks slackers!!!
UPDATE: Nevermind I used an alias instead.
-ul7
You could put a dircolors file, in for example ~/.config/dir_colors, and put this in your ~/.bash_profile:
Code:
eval $(dircolors -b "${HOME}/.config/dir_colors")
Get the original file from /etc/DIR_COLORS and modify to your liking by adding lines. Like so:
Is there a way to permanently put dircolors on the bash for ls command with out typing --col? I have a screen shot to show what I mean. The middle terminal is the one I tried configuring. It's not a big deal, but it would make learning filesystems a lot faster for me. I probably shouldn't mess with these things yet, since I'm just randomly trying things out. Thanks slackers!!!
UPDATE: Nevermind I used an alias instead.
-ul7
You'll want to learn about login and non-login shells. login shells will automatically run all the contents in /etc/profile.d/, which includes setting colors for ls. non-login shells will not do this and will rely on settings in ~/.bashrc
There's many things you can do (which you may want to add to your list of things to research) to get things working properly, but seeing that it looks like you're using konsole, the simplest thing to do is just make all shells within konsole open up as a login shell.
If you go to Settings -> Edit current profile, and then change the command from /bin/bash to /bin/bash -l (dash lower-case L), that will change each shell to be a login shell. You may need to exit your current shell to fix this. You can also start a login shell by running bash -l at the prompt.
When you do your research on these, make sure you look up login vs non-login shell, interactive vs non-interactive shell, and ~/.bash_profile vs ~/.bashrc
I'm too lazy to remember all the research I did on those and found it was easier to just force a login shell every time. You'll also get the side benefit of a better PS1 prompt (the text that shows to the left of the cursor on a new line in the shell).
You'll want to learn about login and non-login shells. login shells will automatically run all the contents in /etc/profile.d/, which includes setting colors for ls. non-login shells will not do this and will rely on settings in ~/.bashrc
There's many things you can do (which you may want to add to your list of things to research) to get things working properly, but seeing that it looks like you're using konsole, the simplest thing to do is just make all shells within konsole open up as a login shell.
If you go to Settings -> Edit current profile, and then change the command from /bin/bash to /bin/bash -l (dash lower-case L), that will change each shell to be a login shell. You may need to exit your current shell to fix this. You can also start a login shell by running bash -l at the prompt.
When you do your research on these, make sure you look up login vs non-login shell, interactive vs non-interactive shell, and ~/.bash_profile vs ~/.bashrc
I'm too lazy to remember all the research I did on those and found it was easier to just force a login shell every time. You'll also get the side benefit of a better PS1 prompt (the text that shows to the left of the cursor on a new line in the shell).
Yep that fixed it permanently. Thanks, sounds like I need to learn a bit about shells and bash. That's actually what I'm doing tonight. Lol I love fortune, so that pops up on every session now on the desktop. Nice! This also shows the pwd like you mentioned which will help when following some of the books and man pages I'm reading.
Ah never mind I just fixed another issue I had. I guess the bash_profile is not set by default. So I just made one in VIM with the alias's I find nice.
You can add that to a ~/.bash_profile to be run on login shells or a ~/.bashrc to be run in non-login shells.
(You can source one or the other within the other to have it work in both.)
Since you're now using a login shell, you can just add it to ~/.bash_profile (the file doesn't exist by default, just create it and add the text in there).
NOTE: You should also know that there's ~/.profile and ~/.bash_profile. ~/.profile is read with pretty much any shell on when in a login session (including bash incompatible shells, like korn or csh). ~/.bash_profile is only run by bash shells. If you have no intention on trying other shells, you can put everything in ~/.profile.
Oh OK that makes sense. What about when I go into su mode? I notice when I go into su mode my alias's and colors are gone as well. I'm assuming that's a different profile? I probably shouldn't worry about using su right now.
Oh OK that makes sense. What about when I go into su mode? I notice when I go into su mode my alias's and colors are gone as well. I'm assuming that's a different profile? I probably shouldn't worry about using su right now.
Every user will have their own shell RC files. /root/.bash_profile will be read by the root user.
Note that you may want to set different defaults for root.
If you decide on Bash as your shell, I recommend playing around with it. It is both very customizable, and an impressive scripting language in its own right.
Every user will have their own shell RC files. /root/.bash_profile will be read by the root user.
Note that you may want to set different defaults for root.
Nice. I will definitely keep that in mind. I better take snapshots while I'm ahead. It's only a matter of time before my curiosity breaks something lol...
Oh OK that makes sense. What about when I go into su mode? I notice when I go into su mode my alias's and colors are gone as well. I'm assuming that's a different profile? I probably shouldn't worry about using su right now.
Correct. Root's files would be located in root's home directory (which is /root/, whereas all other users reside under /home/$USER/). So if you want root to have the same things, you can either copy your ~/.bash_profile to root's home directory, or you can make the changes systemwide by editing /etc/profile directly (or adding your own file under /etc/profile.d/, just make sure it ends in .sh or it won't be added).
Also, when running plain su, you don't get a login shell. This works for a lot of things, but sometimes you need all the scripts in /etc/profile.d/ to be run (especially when compiling). To run su with a login instance, you would run:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.