Main Content

Enable Passwordless Sudo on Raspberry Pi Hardware

To run Simulink® models on Raspberry Pi®, you must enable passwordless sudo. Enabling passwordless sudo allows you to run Simulink models on Raspberry Pi without providing a password.

To enable passwordless sudo:

  1. Log in to the Raspberry Pi command-line interface. The default user name and password of the Raspberry Pi hardware are pi and raspberry, respectively.

  2. In the command-line interface, type this command:

    sudo nano /etc/sudoers

  3. Enable passwordless sudo access by adding this line:

    <user name> ALL=(ALL:ALL) NOPASSWD:ALL

    For example, to provide passwordless sudo access to a user pi, type:


  4. To save your changes, press Ctrl+x on your keyboard.

  5. For these changes to take effect, restart Raspberry Pi by typing this command:

    sudo reboot

See Also