Conventions for local user commands on common Linux distributions

by Lasse Kliemann   Last Updated August 14, 2019 10:01 AM - source

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.


Related Questions



Smallest linux with apt repositories?

Updated April 20, 2015 03:00 AM


Making unix system real time

Updated July 10, 2019 23:01 PM