4 ms·
It says when you run the installer: Note that you must install micro to a directory accessible to all users when doing this, typically /usr/bin. cd to
by gabrielgio 3y ago
It says when you run the installer:
Note that you must install micro to a directory accessible to all users when doing
this, typically /usr/bin. cd to that directory before running this script.
E.g.:
$ cd /usr/bin
$ curl https://getmic.ro/r | sudo sh
or
$ su - root -c "cd /usr/bin; wget -O- https://getmic.ro | GETMICRO_REGISTER=y sh"
- Karellen 3y agoYou conveniently missed off the lines of text above that which explain what "doing this" is: getmicro can use update-alternatives to register micro as a system text editor. For example, this will allow `crontab -e` open the cron file with micro. To enable this feature, define the GETMICRO_REGISTER variable or use the URL `https://getmic.ro/r`. Note that you must install micro to a directory accessible to all users when doing this... Yes, if you want to install `micro` as a system text editor, something you can do (but don't have to), you need privs. Again, so?
- gabrielgio 3y agoI know why it is asking for sudo and that was not my point. Again, my point is: you should never ask the user to run sudo from curl (or actually, don't curl to bash at all). There are plenty ways to sploit that. Again, I know it needs root to move the bin to a root owned folder or update the default editor, but, again, you should never ask (or suggest) the user to pipe shit from the internet, it is security risk. Also there is not even reason for it, micro is available in every distro.