Linux on command

Updated: 05/04/2019 by Computer Hope
on command

On the Solaris operating system, the on command executes a command on a remote system, but with the local environment.

Syntax

on [ -i ] [ -d ] [ -n ] host-command [argument]

Options

-i Interactive mode. Use remote echoing and special character processing. This option is needed for programs that expect to be talking to a terminal. All terminal modes and window size changes are propagated.
-d Debug mode. Print out some messages as work is being done.
-n No input. This option causes the remote program to get EOF when it reads from the standard input, instead of passing the standard input from the standard input of the on program. For example, -n is necessary when running commands in the background with job control.
host-command The host command that you want to execute.
argument Additional arguments.

Examples

on computerhope.com ls

Runs the ls command on the domain computerhope.com.

chkey — Change the secure RPC key pair on SunOS.
rlogin — Begin a session on a remote system.
rsh — Execute a command on a remote shell.
telnet — Connect to a remote system using the telnet protocol.