Is it possible to remove a terminal command? For example, if there was a command call lookup (not an alias), how would I go about removing it?
A better way would be to redirect the output of the command to
EDIT: Thanks to @scai
For the workaround, we will just alias the command to an empty string, then just redirect the resulting error to
That's much better now.
EDIT 2: Thanks to @scai again :-)
You can do that but you shouldn't.
Anyway there are four main places for commands.
/bin & /usr/bin & /sbin & /usr/sbin
To know the command you want where is
Then as a root you can delete or just rename or move to other directory
Be sure that the newPath is not in your $PATH environment
I think this "proper" way to do this would be to use permissions. Let's take the
Here's how I would do it :
Create a group for users allowed to use
Add users to this group accordingly
Remove world permissions on
Change the group ownership of
Make sure group permission allow at least executing
This should bring something like :
Which allows root and lsusers members to execute
Now, about real removal, well this is a package problem. If you want to remove a program (command) from your system, just ask for its package to be removed with :
Of course, this is not the kind of things you could do with