which commandname
will tell you if there's a command already by that name on your system without having to run anything.
This only finds things in places stored in the $PATH
environment variable, though.
You could query your package manager to see what packages for your distribution might contain the command name, but 1) that will also turn up support files and the like and 2) Not all distros have the same commands, especially once you get beyond the core Unix/Linux command set.
e.g. on a system with apt
, I can run apt contains commandname
and get a list of everything containing "commandname"
Another user suggested prefixing with my_
, but you might consider using your initials, a short form of your username or some other identifier instead. e.g. Everyone is "me/my" to themselves, but fewer people share your initials.
Also, a suffix might actually be a marginally better choice depending on your tab-completion preferences.
There's precedent for some actual "official" commands using a .suffix
style, especially when multiple packages have their own version of a particular command, or a minor variant. On my computer I have things such as uncompress.real
, vim.tiny
, lzip.plzip
and telnet.netkit
, for example.
Something like scriptname.arcslime
would fit right in, whether or not scriptname
is a thing in its own right or not.