I installed Viber
on Ubuntu:
/home/nazar/Software/Viber/Viber.sh
I can run it from terminal specifying this path. I want to achieve some short command as:
viber
For lunching application.
How to solve this issue?
I installed Viber
on Ubuntu:
/home/nazar/Software/Viber/Viber.sh
I can run it from terminal specifying this path. I want to achieve some short command as:
viber
For lunching application.
How to solve this issue?
You can create an alias
of the full command by running the following in the terminal:
alias viber=/home/nazar/Software/Viber/Viber.sh
Now you can run the script by just typing viber
.
Note that this will be working for the current session of the shell only. To make it permanent save it in ~/.bash_aliases
(or ~/.bashrc
):
$ echo 'alias viber=/home/nazar/Software/Viber/Viber.sh' >> ~/.bash_aliases
$ source ~/.bash_aliases
The first command will save the alias permanently in ~/.bash_aliases
, the preferred file to save aliases. It will create the file if not exists already. The second command will make the alias working from the current shell session.
An alternate method is to create a symbolic link of the executable script in the /usr/local/bin
or /usr/bin
directory(given they are in your PATH
environment variable).
sudo ln -s /home/nazar/Software/Viber/Viber.sh /usr/local/bin/viber
As the directory is owned by user root
and group root
, make sure /usr/local/bin/viber
has execute permission for all others (a+x
).
By using any one of the above methods, you can run the script by simply typing viber
.