Power button
Press the Power button to turn on your iMac.
Choose Apple menu
You can also lock your Mac by pressing the Touch ID button on your Magic Keyboard. When you first start up or restart, you need to log in by typing your password. After you set up Touch ID, you can authenticate with a touch instead of typing your password (after your first login), and use Touch ID for Apple Pay purchases.