I’m attempting to add support for using Sublime Text and TextMate with files on the router: https://packagecontrol.io/packages/RemoteSubl.

Essentially, the script needs to be added to the /usr/local/bindirectory:

curl -o /usr/local/bin/rmate https://raw.githubusercontent.com/aurora/rmate/master/rmate
sudo chmod +x /usr/local/bin/rmate

Unfortunately, the /usr/local/bin directory doesn’t exist (nor is it on the PATH):

# echo $PATH

Is there a recommended location for user-related scripts, such that they are on the PATH?


It shouldn't be a problem to simply create the directory. (Keep in mind you will need to be root).

mkdir -p -m 755 /usr/local/bin

And to add that to $PATH, in ~/.profile


Editor's notes:

  • Tested on OpenWrt 18.06.4.

  • Changed permissions to 755, which is the default on Ubuntu as per:

    $ stat -c '%a %A %n' /usr/local/bin /usr/local /usr
    755 drwxr-xr-x /usr/local/bin
    755 drwxr-xr-x /usr/local
    755 drwxr-xr-x /usr

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.