rexec – Remotely execute commands under the Linux system

The rexec command is used to remotely execute commands under the Linux system. It allows users to execute commands on a remote system without having to log in to that system. The rexec command is commonly used in network administration and troubleshooting.


The rexec command requires the user to have an account on the remote system and the rexecd daemon running on the remote system. The rexec command takes the following form:

rexec [-l login_name] host_name command

Here, login_name is the username of the user on the remote system, host_name is the name or IP address of the remote system, and command is the command to be executed on the remote system.

For example, to execute the ls command on the remote system with IP address as user jdoe, the following command can be used:

rexec -l jdoe ls

The rexec command can also be used in scripts to automate remote commands.


The following table lists the available options for the rexec command:

Option Description
-l Specifies the username to use when logging in to the remote system.

Troubleshooting Tips

Here are some tips for troubleshooting common issues with the rexec command:

  • Ensure that the rexecd daemon is running on the remote system.
  • Check that the user has an account on the remote system and that the login credentials are correct.
  • Verify that the remote system is reachable and that there are no network connectivity issues.


  • The rexec command is not secure and should be used with caution. It is recommended to use SSH for secure remote access.
  • The rexec command is not available on all Linux distributions.