Something I did to someone who needed to know the effects of not locking ones screen when away: alias ls to echo'Error: file not found'. Took them a good hour to figure out what was wrong with their machine 😅
My guess is that it takes the output of the “exit” command and writes it to .bashrc. I believe this would make it impossible to open the terminal, but it could just close the terminal and do nothing instead.
If you’re just looking for a little fun
echo exit >~/.bashrc
Glorious.
Something I did to someone who needed to know the effects of not locking ones screen when away: alias
ls
toecho 'Error: file not found'
. Took them a good hour to figure out what was wrong with their machine 😅linux rookie here, what’s the command to reverse an alias then? do you just “alias ls ls” to overwrite it?
Backlash. \ls would get you regular ls. Note that ls already is aliased on some popular distros with some common flags.
There’s unalias
You can use unalias, or you can use a backslash in front of an aliased command or surround it in double quotes to ignore the alias temporarily.
Alias ‘ls’ to ‘sl’ for fun times
What’s this do?
My guess is that it takes the output of the “exit” command and writes it to .bashrc. I believe this would make it impossible to open the terminal, but it could just close the terminal and do nothing instead.
That’s nice.
using
systemctl poweroff
adds a bit of extra round trip time…