snipt

Ctrl+h for KB shortcuts

Bash

Creating Symbolic link for Command Line

1
2
3
4
5
6
7
8
# You can change the 'PATHTOTOOL' and the 'PATHTOLINK', 
# to use this command for a variety of tools
# '-s' is used to create a symbolic link (http://en.wikipedia.org/wiki/Symbolic_link).

ln -s "PATHTOTOOL" PATHTOLINK 
 
# Example:
ln -s "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" /usr/local/bin/subl
https://snipt.net/embed/229a3f21d47980e95c73f47c43b47c7d/
/raw/229a3f21d47980e95c73f47c43b47c7d/
229a3f21d47980e95c73f47c43b47c7d
bash
Bash
8
2019-05-25T08:56:46
True
False
False
Oct 05, 2012 at 01:28 PM
/api/public/snipt/48140/
creating-symbolic-link-for-command-line
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a> <a href="#L-6">6</a> <a href="#L-7">7</a> <a href="#L-8">8</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="c1"># You can change the &#39;PATHTOTOOL&#39; and the &#39;PATHTOLINK&#39;, </span> </span><span id="L-2"><a name="L-2"></a><span class="c1"># to use this command for a variety of tools</span> </span><span id="L-3"><a name="L-3"></a><span class="c1"># &#39;-s&#39; is used to create a symbolic link (http://en.wikipedia.org/wiki/Symbolic_link).</span> </span><span id="L-4"><a name="L-4"></a> </span><span id="L-5"><a name="L-5"></a>ln -s <span class="s2">&quot;PATHTOTOOL&quot;</span> PATHTOLINK </span><span id="L-6"><a name="L-6"></a> </span><span id="L-7"><a name="L-7"></a><span class="c1"># Example:</span> </span><span id="L-8"><a name="L-8"></a>ln -s <span class="s2">&quot;/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl&quot;</span> /usr/local/bin/subl </span></pre></div> </td></tr></table>
"Command Line", "Symbolic Links", Bash