M
M
Mikhail Shatilov2014-02-23 01:49:47
linux
Mikhail Shatilov, 2014-02-23 01:49:47

How to put an alias in ubuntu?

Put sublime text 3, but in the terminal on sublime in all variations of the word nothing happens except "command not found".
How to register an alias to open the editor (including opening files through it)?
Found something similar but not the same:
alias sublime="sublime text 3"

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
Denis Usanov, 2014-02-23
@dck

I have Sublime (as well as several other programs) not in the system folder, but simply, for example, in ~/sublime.
There is a bin folder in the home directory. There I have a link to sublime_text.

[email protected] ~/bin $ readlink sublime
/home/deck/Sublime/sublime_text

In ~/.profile such lines
if [ -d "$HOME/bin" ] ; then
    PATH="$HOME/bin:$PATH"
fi

P
Peter, 2014-02-23
@SeNaP

Alternatively, you can copy the binary file to the /usr/bin/ directory

V
vitald, 2014-02-23
@vitald

The full path should be specified in the alias, if it was installed from the deb package, then the path is: /opt/sublime_text/sublime_text

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question