The title line and your comments here do not match. I am no expert, but the title mentions ".zshrc", but in the post above, you mention adding "aliases to the bash file".Hi, well i wasn't sure this is the right place to ask. I have added aliases to the bash file and enabled autocompletion but i have to run source everytime i log into terminal to get the aliases to work. Autocompletion won't work at all even though i enabled it. I will copy and post the file tomorrow (on my laptop right now) and maybe someone can point out what i need to modify. ChatGPT has helped me to this point but were now both stuck.
I am just going to use Fish and move on with my learning.
Thanks all!
The advantage of zsh is that it is fully POSIX compliant and that fish isn't and the functionality(syntax highlighting, auto-suggestions, etc) that is builtin into fish you can add to zsh by using plugins. I use zsh and I just place my aliases in ~/.zshrc and they work without having to source that file first.I am just going to use Fish and move on with my learning.
cat /etc/profile.d/szshrc.sh
source ~/.zshrc
BTW, tryI have to source every time I open terminal just to get these simple aliases to work:
# Pauls alias
alias x='sudo apt update && sudo apt upgrade && sudo apt autoremove'
alias c='clear'
Then they work for the entire session. And yes I save my work and they show up in Nano when I open terminal.
ctrl-l
instead of typing clear. Quicker and easier There is a difference between the commands "cntl+l" and "clear" on some terminals in X. Whereas "cntl+l" will usually still allow the user on the terminal to scroll back, (if that's been configured for the X terminal which it usually is by default), the "clear" command usually has that disabled so that it just provides the cleared terminal one expects, and that's it. On consoles, (text consoles with no X), scroll back is no longer configured in the kernel any more so it can't be done for current kernels.BTW, tryctrl-l
instead of typing clear. Quicker and easier
This is true - I scroll back often but also like a semi-clean slate lolThere is a difference between the commands "cntl+l" and "clear" on some terminals in X. Whereas "cntl+l" will usually still allow the user on the terminal to scroll back, (if that's been configured for the X terminal which it usually is by default), the "clear" command usually has that disabled so that it just provides the cleared terminal one expects, and that's it. On consoles, (text consoles with no X), scroll back is no longer configured in the kernel any more so it can't be done for current kernels.
You actually don't need to use the root user to manage your system, you can do that with your main account using sudo.OK I finally figured it out and learned quite a bit, thanks for steering me in the right direction.
For one thing root uses bash and user uses zshrc so that was messing me up. There was already an If/Fi statement leading to an alias file in root bash so I created and populated it, then I did the same for zshrc, now my aliases work in root or user.
Thanks again
I found out the hard way by using "clear" and then losing the scroll backThis is true - I scroll back often but also like a semi-clean slate lol
For others like me:BTW, tryctrl-l
instead of typing clear. Quicker and easier
It works the same for every version of Linux (and different desktop managers) that I have seen, but other operating systems are different.I found out the hard way by using "clear" and then losing the scroll back