A thorough wash with soap and water is better, but harder to distribute around an office building, hotel, conference center, etc.
https://www.cdc.gov/handwashing/show-me-the-science-hand-san...
Soap is simpler and faster, if you can use it.
p. 11 "Alcohol-based solutions were more effective than washing hands with plain soap in all studies, and they reduced bacterial counts on the hands more than antimicrobial soaps or detergents in the majority of experiments"
https://www.cdc.gov/handhygiene/science/index.html
An alcohol-based hand sanitizer is the preferred method for cleaning your hands when they are not visibly dirty because it:
-Is more effective at killing potentially deadly germs on hands than soap
-Is easier to use during the course of care, especially when moving from soiled to clean activities with the same patient or resident & when moving between patients or residents in shared rooms or common areas
-Improves skin condition with less irritation and dryness than soap and water
"Certain enveloped (lipophilic) viruses (e.g., herpes sim-plex virus, human immunodeficiency virus [HIV], influenzavirus, respiratory syncytial virus, and vaccinia virus) are susceptible to alcohols when tested in vitro"
Covid-19 is an enveloped virus, not a bacteria. Unfortunately relative efficacy compared to soap and water for these types of viruses doesn't appear to be discussed.
and
"Applying small volumes (i.e., 0.2–0.5 mL) of alcohol to the hands is not more effective than washing hands with plain soap and water (63,64). One study documented that 1 mL of alcohol was substantially less effective than 3 mL (91). The ideal volume of product to apply to the hands is not known and may vary for different formulations. However, if hands feel dry after rubbing hands together for 10–15 seconds, an insufficient volume of product likely was applied."
More or less saying that technique matters here, and a quick squirt of hand sanitizer may not do much. That being said, hand washing technique matters too: commonly poorly washed areas include between fingers, finger tips, under fingernails, and the thumb.