Create your custom command in Linux is very simple. I will take a specific case and use it to explain the process.
I have a Linux machine which is used as a Jenkins slave that is configured to work with windows slaves. I can’t change this configuration so my workaround is replace the command “C:\Program File\Git\cmd\git.exe” for the “git” command. To achieve this I’ll create a command called “C:\Program File\Git\cmd\git.exe” that will be used to run git commands.
1. Create a Bash Script which will run your command
2. Make the command executable
3. Copy your script to the path “/usr/bin”
4. Test your new Linux Command
Note: To delete your command just move to the path “/usr/bin” and remove the script