title: To check if a bash script is run as root or a regular user?
body: <p>I have started learning bash scripting. I have a conceptual doubt , How to determine if the script is run as root or a regular user.?</p>
  
  <p>I know the UID if user is 0, But i don't understand how to implement it.? Can anyone explain me how to make it work.? Is it possible to print a message as <code>"Not a root user"</code> when the script is run as a regular user?</p>
  
  <p>My script is a simple <code>hello_world.sh</code>:</p>
  
  <pre><code>#!/bin/bash
  echo 'Hello World';
  </code></pre>