Hinduism views Lord Shiva as the personification of the Supreme Godhead or the absolute principle. That is why he is also worshipped in the form of Linga which symbolizes the source of all cosmos. Therefore, it is appropriate that Shiva is called Mahadev, the greatest of all gods and in other words, the god of all gods.
The word Mahadev literally means the biggest god or the superlative one who is second to none. The other meaning is also the leader of all gods. Thus, the expression visualizes Shiva as the highest god in the hierarchy with the other gods occurring in the various strata of the pyramid.
Shiva worshipped as Natraj best brings out this Mahadev principle. Lord Natraj is the dancing form of Lord Shiva. He is shown to be engaged in a cosmic dance. He has in him all the five elements namely sky (symbolized by the double drum or the percussion instrument he holds in his hand), air (symbolized by the deer he holds in his hands), fire (held in one of the hands), water (the holy Ganges flowing from his matted hair), and earth (the holy ash smeared all over his body).
It is said that the whole universe came forth from the double drum sounded by Lord Shiva. Then Vishnu appears from him to take care of the creation. Then Brahma emanates from Vishnu’s naval to continue the creation of the rest of the worlds. Thus, it is from Shiva that all the other gods came forth. During the process of dissolution, Lord Brahma merges back into Lord Vishnu and Lord Vishnu merges back into Lord Shiva thus completing the cycle. Lord Shiva is alone without any second one during that time and found engaged in cosmic dance smearing the holy ash all over his body.
Thus in the sense of Mahadev, Lord Shiva is the primordial entity that existed before any second thing came forth and also the final entity that shall remain after all the created worlds are dissolved. There is yet another expression that addresses Shiva as Pashupati or the head of all the animals. In this expression, all that is created are addressed as Pashu and Shiva then becomes the Pathi or the leader of the created beings getting the name Pashupati.
The other name that denotes this similar concept of the highest entity is Linga, the word used to refer to the symbolic expression of Shiva in the egg like shape. Here Shiva is conceived as the cosmic womb, the first egg (refer to the big bang theory) from which all other things sprang forth. The other name of this first egg is Hirnayagarbha or the golden womb.
The word Linga is formed from two sounds namely ‘Li’ and ‘Ga’, meaning Liyate (coming forth from it) and Gamyate (merging back into it) respectively. Thus Linga or the symbolic form of Lord Shiva is the primary source of everything and the final destination of anything. Thus, Mahadev becomes an expression in these lines that views Shiva as the supreme principle.