I am facing a problem with bash alias in Kali linux. Let me tell from the beginning.
I want to set some command to save time from writing it again and again. So, I used
nano /.bash_aliases
and set a command line
alias up='sudo apt update && sudo apt full-upgrade'
then I press Ctrl+V and hit y then hit Enter. I closed the terminal and open it. When I put up and press enter it shows:
up: command not found
Then I searched for solution and find one telling to do this.
gedit .bashrc
In the .bashrc file this is written without any '#'
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
Then I get into bash_aliases file with this command
gedit bash_aliases
And write this and save...
alias up='sudo apt update && sudo apt full-upgrade'
and close the terminal. In new terminal that same error happens. No command found. I have also do these in order to solve this problem:
reboot my pc
totally turned off and again turn on my pc
Try some random solutions like
source ~/.bashrc bash -i -c my_alias
But I found the problem again and again. Here is a screen shot if I forgot to add any details. Thanks in advance.

/.bash_aliasesor did you mean~/.bash_aliases? What user did you edit the file as? You show a terminal where you are logged in as root. If you want this alias for root, why did you usesudo? Did you maybe not want it for root but for your regular user?bashby default. It useszsh, which has its own set of initialization files. The file~/.zshrcwould be the one most relevant to this question./.bash_aliases,~/.bash_aliases, andbash_aliases(in any directory) are three different files. It's seldom useful to try a similar but different filename, or the same filename from a different directory. And based on the above comment, you might want to double-check which shell you're running. tryecho "bash=$BASH_VERSION zsh=$ZSH_VERSION"and see what you get.