Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialChandler Tayek
5,513 PointsCreating a symbolic link in windows
I want to be able to use sublime text 2 to open files in my git terminal (aka command line) in windows. I ran
ln -s /c/Program\ Files/Sublime\ Text\ 2/sublime_text /c/Windows/system32/subl
Expected to be able to type subl and then file name or directory to open up a file through my command.
What actually happen:
no such file or directory
I think where I went wrong is the second argument but I'm not sure where I can put the symbolic link. Other places said maybe usr/bin or usr/local/bin.
3 Answers
James Barnett
39,199 PointsI should have read your original post more carefully, sorry about that.
On 2nd thought ...
I think where I went wrong is the second argumen
I think it's the first I don't think a file named sublime_text
exists but I think one name sublime_text.exe
does
ln -s /c/Program\ Files/Sublime\ Text\ 2/sublime_text.exe /c/Windows/system32/subl
James Andrews
7,245 PointsSymbolic links are a Linux command not windows. To the best of my knowledge yo can't do in windows
James Barnett
39,199 PointsSymbolic links are a Linux command not windows
Nope symbolic links are a file system concept not unique to Linux.
To the best of my knowledge yo can't do in windows
mklink
was added in Vista, before that 3rd party implemention of soft links called "junctions" were supported in Windows 2000/XP.
James Andrews
7,245 Pointsbut the command he is using "ln" is a unix command and not a windows command. hence his error.
James Barnett
39,199 Pointsthe command he is using "ln" is a unix command
yep, ln
is a command symbolic links are a functionality, it's provided in Windows with mklink
and in Linux with ln
.
Also I should have paid more attention, his error has nothing to do with ln
it's saying that's an invalid path.
James Barnett
39,199 PointsIt depends on how you choose to install git bash to how you can access those tools.
I selected the option to unix tools to my path so they are available everywhere.
No matter, there's more than one way to do it. If you are running Vista or better you can just use mklink
from the Windows command line.
Chandler Tayek
5,513 PointsIt says that the command mklink is not found.... :(
Chandler Tayek
5,513 PointsBtw I'm using git bash's terminal for windows
James Barnett
39,199 PointsIt says that the command mklink is not found
mklink
is a Windows command so make sure to run it on a Windows command prompt not on a gitbash prompt.
I'm using git bash's terminal for windows
When you installed msysgit, there were 3 different options of how gitbash