How to make the Namenode leave Safemode?

Here are the few simple steps that I followed to make the NameNode leave the safemode.

# hadoop fs -expunge # sudo -u hdfs hdfs dfsadmin -safemode leave