Forrest logo
back to the vncviewer tool

vncviewer:tldr:8f886

vncviewer: Launch a VNC client which connects to a host on a given display.
$ vncviewer ${host}:${display_number}
try on your machine

The command "vncviewer ${host}:${display_number}" is used to run a VNC (Virtual Network Computing) viewer to connect to a remote desktop or machine.

  • "${host}" is a placeholder for the hostname or IP address of the remote machine you want to connect to. For example, if the remote machine's hostname is "example.com", you would replace "${host}" with "example.com". Similarly, if the IP address is "192.168.1.10", you would replace "${host}" with "192.168.1.10".

  • "${display_number}" is a placeholder for the display number of the remote machine. In VNC, the display number determines which desktop you want to connect to in case there are multiple users logged in. The default display number is usually 0. So, if you want to connect to the default display, you would replace "${display_number}" with "0".

By replacing the placeholders with actual values, the command tells the VNC viewer to connect to the specified remote machine and display the desktop from that machine on the local computer.

For example, if you want to connect to a machine with the IP address "192.168.1.10" and display number "1", you would run the command as follows:

vncviewer 192.168.1.10:1

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the vncviewer tool