Newer Chromebooks block sudo
in crosh, so you need to Ctrl+Alt+F2 (or higher) to get to a vty where you can login as root
directly. Then you should run chromeos-setdevpasswd
so that you can login as chronos in the VTY and use sudo with its password to perform any necessary elevations. It still won't allow sudo in the crosh shell in a GUI session (while older ChromeOS releases do), but the vast majority of scripts like Chromebrew/et al that use sudo expect you to NOT run directly as root, so enabling sudo this way is the best option and allows you to still use some of those tools via the VTY.
#Ctrl+Alt+F2
root
chromeos-setdevpasswd
#'yourpassword'
#'yourpassword'#again
exit #or Ctrl+d
Logout of the root session and switch back to the GUI and then logout/exit any chronos session in Crosh and start a new one by typing shell
in Crosh.