I would like to know the diffrence beteen the following commands:
sudo x11vnc -auth /var/lib/lightdm/.Xauthority -display :0
thank you in advance.
It is the same command so there is no difference.
If you meant: what do the options mean: the manual explains it like this:
X11 server display to connect to, usually :0. The X server process must be running on same machine and support MIT-SHM. Equivalent to setting the DISPLAY environment variable to disp.