Is the word "hold" used in the same way in the following two sentences?

The general ordered the colonel to hold his position at all costs.

He held the governorship for almost a decade.
different meanings