-1

I am trying to output the dmesg to a log file so I can look at it through my txt editor, but i keep getting an error msg:

dmesg > /Desktop/log.txt

gives me this error: bash: /Desktop/dmesg.log: No such file or directory

I have also tried: dmesg >> /Desktop/log.txt but i get the same error message.

what am i missing?

1

There is no /Desktop/ folder by default, and there shouldn’t be one.

To access the Desktop folder in your user's home folder use either the full /home/your_username/Desktop/ (replace your_username with your actual user name) or the shorter ~/Desktop/.

So

dmesg > ~/Desktop/log.txt

should do what you want.

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.