-
Notifications
You must be signed in to change notification settings - Fork 0
Creating script alias
AJ but at Work edited this page Feb 16, 2026
·
4 revisions
- Open your shell configuration file:
nano ~/.bashrc - Scroll the the bottom, and add an alias line:
alias aliasName= path-to-script.sh- E.g.
alias beans='~/Desktop/XT7_RT/scripts/beans.sh'
- E.g.
-
Ctrl+O,Enter, &CTRL+Xto save and exit. - Reload the shell config:
source ~/.bashrc - To run, simply type the name of the alias.
#!/bin/bash
cd /home/ajrob/Desktop/XT7_RT/build
cmake ..
make
sudo ./main
# Make it executable
# chmod +x ~/Desktop/XT7_RT/scripts/beans.sh
# Then make it a global alias. We are going to add it in ~/.bashrc
# nano ~/.bashrc
# We go to the bottoma and add the following line
# alias beans='~/Desktop/XT7_RT/scripts/beans.sh
# Save and refresh with:
# source ~/.bashrc