I am using solidity 0.4.24. The latest version has been updated. How to upgrade my solidity version? Is there any commands for it?
Simply use the new compiler.
If you are using Remix, choose the new one in the “Run” tab, drop up “compiler” menu.
If you are using Node, npm install -g solc@latest (at the moment it is 0.5.3).
If you are using truffle, upgrade to truffle 5.
You will be possibly required to upgrade/correct your code too: simply follow the compiler errors and warning messages and upgrade your code accordingly to the now updated 0.5.3 documentation.
Apart from upgrading the compiler, you will most likely need to migrate your contracts. A useful guide for migrating is https://solidity.readthedocs.io/en/latest/050-breaking-changes.html.
Your question tagging implies that you are compiling via Truffle.
If so, then simply upgrade your Truffle version from 4.x to 5.x.
If installed globally, then just run
npm update -g truffle.
If installed locally, then in
package.json, change this:
"truffle": "4.1.14" // I am guessing it's 4.1.14 because your solc version is 0.4.24
"truffle": "5.0.2" // The latest version at this point in time