Is it possible to reload bashrc with a terminal command?
Answering your question in the title of the thread, if you define an alias on the command line, then it’ll be available throughout that entire session, as long as you don’t close the window.
Answering your second question, yes, you can reload
~/.bashrc from the running session…
However, this is where I must point out that you must check whether you are indeed running
bash, because terminal window sessions now use
zsh by default in all three of the official Manjaro editions, and for
zsh you need
or using dot:
Yes, but considering that the dot is duplicitous in the eyes of newbies — you know, as in “dot files” — I deliberately omitted that.
Indeed, the dot (
.) — followed by a space — is a built-in shell command that does the same thing as the (equally built-in) command
… is the same thing as…
So when creating an alias at the command line, the alias can only be used during that session. Well \hen how can I make a permanent alias?
Can’t speak to ZSH, but you can put an alias in your .bashrc file:
Re-source your .bashrc, and viola.
As an aside, I have a .bash_aliases file. Keeps my .bashrc nice and neat.
To load zsh, we type
Now we can type
alias zsh='source ~/.zshrc
alias zshconfig='micro ~/.zshrc
Exit that terminal… open a new one and type
zsh - loads shell
zshconfig loads config.
By putting the alias inside your
Haha yes, I copied from the config but said just put in the terminal - after you put in the alias, you can test it with ‘zshconfig’ and then edit the config.
Personally I prefer ‘code’ and open it separately from the terminal.
but micro is good too…
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.