Tag: linux

incomplete list of linux mail commands

As mentioned in the previous post, if you need to run cron jobs in linux, knowing how to debug them via mail is really important.

By the way, mail is the older program, the link above is to the man page of mailx which is the newer program created relatively recently, in 1986!

Navigating through messages in the mailbox is quite a challenge as I found.

So I decided to create a list of the commands which I used most frequently and found useful.

Continue reading

Use Wake-On-LAN to wake up another computer when your PC resumes

Starting up another computer on a network itself is such a fascinating idea! For me, it literally feels like magic!

There are so many things involved. The computer which needs to be started (or woken up) has to have the capability, both at the hardware and the software level.

Also the computer doing the waking needs to send a magic packet!

When I initially heard this, I honestly thought this was a joke of some kind. A magic packet? Really?

Continue reading

different ways to run program as root

I discovered that there are many different ways to run a program as root.

The most well known way is to use the sudo command

$> sudo run_as_root_program.sh

This, of course, prompts for the password which you need to then enter.

But what if we need to run the program itself from another program so that the password prompt doesn’t appear?

I came across this requirement recently and it took quite a few iterations before I got it right.

Continue reading

change default sudo editor in visudo

For whatever reason, the default editor to change sudo permissions, which pops up when visudo is entered, is set to nano. I don’t have a clue why an option can’t be given on first use to change the editor.

The way to change it is to run the update-alternatives command

$> sudo update-alternatives --config editor

Which gives us these options.

visudo options

Select 3 for vim.basic and we’re back to sanity.

Copyright © 2025 the möbius trip

Theme by Anders NorenUp ↑