The -s parameter is so that it does not ask you for a password.
the command is:
sudo -s /bin/bash -c "command"
example:
sudo -s /bin/bash -c "wpa_supplicant -i wlx68b9d3103445 -c
/etc/wpa_supplicant/wpa_supplicant.conf -B"
- wpa_supplicant: The program that handles Wi-Fi authentication and connection.
- -i wlx68b9d3103445: Specifies the wireless network interface to use.
- -c /etc/wpa_supplicant/wpa_supplicant.conf: Specifies the path to the file containing the credentials (SSID and password).
- -B: Runs the program in the background.
Using the intermediate shell ensures that the command is executed with a predictable environment and that any special characters inside the quotes are handled by the root shell rather than the current user’s shell.
This is very useful for a script that runs a sudo command.