I've been a professional C, Perl, PHP and Python developer.
I'm an ex-sysadmin from the late 20th century.
These days I do more Javascript and CSS and whatnot, and promote UX and accessibility.
I think there's a mistake in your first example - it looks like you skipped ahead a step, because the error message and command refer to different paths:
ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" ~/bin/subl
-bash: /usr/local/bin/subl: No such file or directory
If it's just something for you, not something for all users, then putting it into ~/bin like Sublime suggests is probably a better idea. You'll usually have to add $HOME/bin to your PATH, but that's a one-off change, and it'll set you up for knowing how to install things on environments where you're not the owner, like shared hosting or generally any foreign system.
If you're downloading something then being able to install it without having root is good because in my opinion, waaaay too many tutorials and whatnot expect you to copy-paste commands starting with sudo whether they need root permissions or not, and I've seen a lot of people just end up using it as a hammer to fix every bent nail.
Also worth checking out is the install command, which handles a lot of this for you but copies the files instead of linking them. Too many symlinks in /usr/local/bin means that after a while, as your machine gets older, you're likely to run into some broken ones from when you thought you'd tidy up all those install files into an old_programs directory.
Ah, you're right, it should've been "command not found". And right about adding ~/bin to my $PATH, I hadn't done that yet setting up the new computer, and never really understood why I should do that, but now I get it! Thank you so much, I'm updating the post to reflect this.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I think there's a mistake in your first example - it looks like you skipped ahead a step, because the error message and command refer to different paths:
If it's just something for you, not something for all users, then putting it into
~/bin
like Sublime suggests is probably a better idea. You'll usually have to add$HOME/bin
to yourPATH
, but that's a one-off change, and it'll set you up for knowing how to install things on environments where you're not the owner, like shared hosting or generally any foreign system.If you're downloading something then being able to install it without having root is good because in my opinion, waaaay too many tutorials and whatnot expect you to copy-paste commands starting with
sudo
whether they need root permissions or not, and I've seen a lot of people just end up using it as a hammer to fix every bent nail.Also worth checking out is the
install
command, which handles a lot of this for you but copies the files instead of linking them. Too many symlinks in/usr/local/bin
means that after a while, as your machine gets older, you're likely to run into some broken ones from when you thought you'd tidy up all those install files into anold_programs
directory.Ah, you're right, it should've been "command not found". And right about adding
~/bin
to my$PATH
, I hadn't done that yet setting up the new computer, and never really understood why I should do that, but now I get it! Thank you so much, I'm updating the post to reflect this.