سؤال

I was trying to create a symlink to the sublime exe file from the sublime package to usr/bin using su:

su ln -s /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl /usr/bin/

but it gave me an error:

su: Sorry

It seems to work when I use sudo. As far as I was aware (I might be wrong), su switches to root user, whereas sudo runs a command from root user perspective but doesn't switch to it..In that case shouldn't both work?

هل كانت مفيدة؟

المحلول

su takes options of it's own, to run a command, try su -c <command>

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top