0

I use dmesg in Ubuntu heavily. I like the iso time format but I hate typing it out every time, so I use something like this in my .bashrc to set the default time format for dmesg:

# Setup alias for dmesg
alias dmesg="/bin/dmesg --time-format=iso"

Is there a better/proper way of doing this? Per user or globally, I don't care.

  • Better than what you have already? Which works perfectly? – Michael Hampton Aug 17 at 21:13
  • It works fine, I'm just trying to find out if it reads a profile file somewhere else that I should be editing instead. – dgreene Aug 17 at 21:22
  • 1
    It sure looks like you edited the correct file. What more do you want? – Michael Hampton Aug 17 at 21:23
0

dmesg doesn't have a configuration file, so the only way to change its behavior is via command line options. As such, the way you're doing this is just fine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.