I created a script called mcd in bash that I can then use directly from the command line. But when I restart Linux, I can't use it. So the written script is not saved by default. Maybe there is a way to save custom scripts?
at first:
hanyuchi@TABLET-1DDNDEN4:~$ mcd () {
> mkdir -p "$1"
> cd "$1"
> }
hanyuchi@TABLET-1DDNDEN4:~$ mcd example2
hanyuchi@TABLET-1DDNDEN4:~/example2$ cd ..
hanyuchi@TABLET-1DDNDEN4:~$ tree
.
├── UTF-8
├── brightness
├── example
├── example2
├── last-modified.txt
├── one
│ └── a
└── two
└── b
4 directories, 5 files
after restarting the system:
hanyuchi@TABLET-1DDNDEN4:~$ mcd example3
Command 'mcd' not found, but can be installed with:
sudo apt install mtools