To make your script accessible from anywhere in Linux, you can add it to a directory listed in the PATH environment variable. Here's how you can do it:
- Choose a directory to store your custom scripts. For example, you can create a
bindirectory in your home folder. Open a terminal and run the following command to create the directory:
mkdir ~/bin- Move your script to the bin directory. Assuming your script is named check_devices.sh and located in the current directory, run the following command:
mv <downloaded_folder>/A-complete-linux-tool-for-AOSP-developer ~/bin/- Add the
bindirectory to yourPATHenvironment variable. Open the.bashrcfile in a text editor using the following command:
nano ~/.bashrc- Add the following line at the end of the file:
export PATH="$HOME/bin/A-complete-linux-tool-for-AOSP-developer:$PATH"
. utils.sh-
Save the changes and exit the text editor (in Nano, press
Ctrl+X, thenY, thenEnter). -
To apply the changes immediately, run the following command in the terminal:
source ~/.bashrc- Now, you should be able to run your script from anywhere by simply typing its name, like any other command. In this case, you can use the following command to execute your script:
nrj_start_log or va_help- You can always use "va_help" to get help text.