There’s probably a million flags to use for this, but for typical use:

  1. sudo emerge --sync — analogous to apt update. Refreshes package overlays.
  2. If prompted to (the sync will indicate it), update Portage first per the instructions in the message (usually sudo emerge -a --oneshot sys-apps/portage).
  3. sudo emerge -a --update --deep --newuse --keep-going @world — analogous to apt upgrade
    1. -a: ask confirmation first
    2. --update: do an update, not a new install
    3. --deep: update the entire dependency tree
    4. --newuse: check for updates to useflags
    5. --keep-going: if a package fails to compile, move on to the rest of the updates instead of stopping dead (useful for overnight updates)
    6. @world: target everything presently installed