When using linux system, it inevitable that we will using terminal, maybe the one we mostly using is sudo. sudo nano /etc/...
, sudo apt update
, sudo pacman -Syu
and other command that need privileged permission. Then instead using plain sudo, we can make it more beauty by add some template file to it.
Ok, (g)root let me pass.
First we need enable lecture
, what is lecture?
We should be seeing once at beginning or so then it not shown again, but we need to make this always shown because we want to see our beautified sudo
every time
Add this line to /etc/sudoers
Defaults lecture=always
Depends on personal interest you can use sudo visudo
or sudo nano /etc/sudoers
You may not directly see it after adding the line, use sudo -K
to reset it
Then when you execute sudo again, the lecture will show.
Then we append another line
Defaults lecture_file=/etc/sudo_lecture.txt
/etc/sudo_lecture.txt
will be the file that we modify as we wish.
Some sample of it:
┌──────────────────────────────────────────┐
│ │
│ mmmm │
│ # "m mmm m mm mmmm mmm m mm │
│ # # " # #" # #" "# #" # #" "│
│ # # m"""# # # # # #"""" # │
│ #mmm" "mm"# # # "#m"# "#mm" # │
│ m # │
│ "" │
└──────────────────────────────────────────┘
Using toilet
command to generate sudo_lecture
$ sudo sh -c 'toilet -f bubble --metal "Be careful with sudo" > /etc/sudo_lecture.txt'
# invalidates the user's cached credentials #
$ sudo -K
$ sudo -i
My personal favorite:
\^V//
|. .| I AM (G)ROOT!
- \ - / _
\_| |_/
\ \
__/_/__
|_______| With great power comes great responsibility.
\ / Use sudo wisely.
\___/
If the code above show grabled in your browser you can download here: sudo lecture
sources: