Conventions for local user commands on common Linux distributions

1

Are there any conventions that a system administrator could follow for naming local user commands, i.e., scripts written by the admin that are made available to users via PATH? The goal is to prevent clashes with commands provided by the distribution in the default PATH. Of course, any such convention would require the cooperation of the respective Linux distribution (I'm particularly interested in Debian).

Suggestions:

  • Prepend the command with a domain that the admin controls, perhaps in reverse notation: com.example-passwdldap for a script to change password in the local LDAP server. This will certainly prevent name clashes, however, users might complain about the long names.
  • Prepend the command with an underscore: _passwdldap. AFAIK, internal functions in shell scripts are often named like this, which should not be a problem however.
  • Prepend the command with two underscores: __passwdldap. This kind of naming is also common for internal function, which I think should again not be a problem.
  • Appending one or two underscores may not be as clear, in particular if a command of the same name (without the underscores) indeed exists on the system. Users might use auto-completion and then forget to append the underscore.

Lasse Kliemann

Posted 2019-08-14T09:26:58.077

Reputation: 78

No answers