The vc-switch program

vc-switch console number [command arg ...]

vc-switch uses the given console to activate the virtual console with the given number, and then runs command. If no command is given, vc-switch exits after switching consoles. console may be specified as a file descriptor or path; it is typically given as /dev/tty. Currently, vc-switch is only known to work on Linux systems.

Example: to switch to VC 3, you might run: vc-switch /dev/tty 3