Welcome to SparkyLinux forums
Zapraszamy również na polsko-języczne Forum

<SOLVED> Bashing executable sh as alias

Started by simplio, August 11, 2019, 05:46:43 PM

Previous topic - Next topic


I wanted to just type in "op25" from home directory in terminal without having to cd all the time. I tried the instructions here

QuoteIn the comments below Mr. Alex Bowman found an easier way to launch the program.  Create an alias in Linux so that you just type "op25" (without the quotes) into the terminal from any directory.

sudo nano .bashrc

Then paste in the following lines.

#OP25 alias
alias op25='bash /home/john/op25/'

Be sure your path is right about.  Note my path of /home/john.  Yours is different unless your name is John, of course.

Now hit Ctl key plus X, then hit Y to save.  Restart the terminal and you should now be able to launch OP25 just by typing OP25.  It works like a champ.  I tried it.

That's it.  I hope I made this easier for someone.

the correct directory for me is 'bash /home/ddejr/op25/op25/gr-op25_repeater/apps/'
Did that and failed  ???

Quoteddejr@ddejr-pc:~$ op25
bash: op25: command not found
ddejr@ddejr-pc:~$ sudo nano .bashrc
ddejr@ddejr-pc:~$ op25
bash: op25: command not found


Instructions from the article are :
1) create little shell script called with such content:

#! /bin/sh

cd /path/to/the/op25/op25/gr-op25_repeater/apps

./ –args 'rtl' -N 'LNA:47' -S 2400000 -f 857.2625e6 -o 25000 -q -2 -T trunk.tsv -V -2 -U 2> stderr.2

2) make it executable

sudo chmod +x /path/to/the/

3) create alias

sudo nano ~/.bashrc

Then paste in the following lines.

#OP25 alias
alias op25='bash /path/to/the/'

Quote from: forum rulesWhen an issue has been resolved for you, please edit the original post to include <SOLVED> in the title. This provides a good indicator for users with a similar problem to check out the thread
Want to chat? Join #sparkylinux at [url="//"][/url]


did OP restart bash?

when the alias command has run- it should work.

check by listing the aliases!

(type alias) and look for it in alphabetical order.


I didn't know to exec bash. I did exec bash after editing it in bash, it worked. I did two entries into bash and didn't need to make one shell script executable. Thanks!  :)

View the most recent posts on the forum