I found this exchange while looking for the same thing. I don't really love any of the answers above (the accepted answer doesn't even work for me in gnome 3.28.2) so I'll add to what I've found.
poweroff
is the closest; it's a command I never knew existed and is nice to know about; but in my opinion, I don't like that there is no confirmation.
I found the program gnome-session-quit
which seems to handle all the functions of the status menu you're talking about. By default it will just pop up a window for logging out in 60 seconds, or immediately if you click yes, or the ability to cancel.
Furthermore, it has logout, power-off, and reboot.
Usage:
gnome-session-quit [OPTION…]
Help Options:
-h, --help Show help options
Application Options:
--logout Log out
--power-off Power off
--reboot Reboot
--force Ignoring any existing inhibitors
--no-prompt Don’t prompt for user confirmation
So, it appears the best option I've found so far is to go to keyboard shortcuts in gnome and create a custom shortcut to gnome-session-quit --power-off
and/or gnome-session-quit reboot
.
I found this document Design/OS/KeyboardShortcuts which talks about "PowerOff" being Super-F4, it doesn't seem to be implemented yet; however, I really like the idea of that being the shortcut inline with the rest of the window management through the super key in gnome3 - so I would recommend that key.