I am a new user of Ubuntu and I was trying to find my xorg.conf
. I used
find / -name xorg.conf
but it says "permission denied" like in this image. What can I do to get the permission?
I am a new user of Ubuntu and I was trying to find my xorg.conf
. I used
find / -name xorg.conf
but it says "permission denied" like in this image. What can I do to get the permission?
Use sudo:
sudo find / -name xorg.conf
sudo allows a permitted user to execute a command as the superuser or another user.
For more info:
man sudo
(you can quit with Q)
You are getting all those "permission denied" messages because the directories are not readable by you and you are not running as root. xorg.conf would be in a readable/traversable directory anyway (/etc/X11), so if you didn't find it, it doesn't exist (but read on). If you don't want to see all the permission denied messages, just redirect stderr to /dev/null (2>/dev/null)
Modern Xorg servers do not really need an xorg.conf. If you must have one, run Xorg -configure (relevant man pages: Xorg(1) and xorg.conf(5)).
You are getting all those "permission denied" messages because the directories are not readable
Try:
sudo find -perm -a+r / -name xorg.conf
-perm -a+r means that the current user (which is root once sudo is taken), its group and others must all have read permission
Direct Answer: Use sudo
to run with administrative privileges. More precisely, as described in the man page: "sudo allows a permitted user to execute a command as the superuser or another user, as specified by the security policy."
sudo find / -name xorg.conf
Best Answer: Use locate
instead.
locate xorg.conf
Cool Answer: add 2>/dev/null
at the end to discard error/warning messages. -iname
is cool because it makes the search case insensitive.
find / -iname xorg.conf 2>/dev/null
Credit for the 2>/dev/null
part: https://unix.stackexchange.com/a/231626/145311
Basic Find command reference: http://www.binarytides.com/linux-find-command-examples/