Lock the screen or put the computer to sleep
Leave the computer locked or asleep from the bar, with two or three letters.
Lock the screen
Open the bar, type lock, choose Lock the screen and press Enter. Your apps go on working.
On the Mac, this turns the screen off. Whether it asks for your password when you come back depends on the settings of the Mac, in Lock Screen.
If your Mac waits some minutes before it asks for the password, anyone can come in during that time. Choose to ask for it at once.
On Windows and Linux, your session is locked at once.
Put it to sleep
Type sleep, choose Sleep and press Enter. Neither command asks first.
If it is not the first result
The apps come before the commands. If one has the same letters, go down with the arrow keys, or type more of the name, such as lock the.
On Linux
TotalLaunch asks the system with loginctl and systemctl. If nothing happens, your desktop does not use them, and you need its own menu to lock or to sleep.