Yep, there is a command in Linux for this.
There is no such application in windows by default, you might find a graphical program for this purpose.
If you have webspace somewhere, you could upload a whois PHP script ( http://hotscripts.com/PHP/Scripts_an...ois/index.html )and do the lookups with it.
Checking for an A record will not determin whether a domain is registered. When you check an A record you are attempting to resolve a hostname to an IP address. Whether you find this depends on whether the owner of the domain has decided to resolve that particular hostname to an IP address; they by no means have to.
For example a person can register a domain and only use it for email. They will then only have an MX record for the domain (that MX record does not have to resolve to an A record using the host domain).
In order to determin if a domin is registered you should query the root servers for an entry. No domain can work without unless it has an entry in the root servers (new.net domains excluded). To do this you need to check for NS records for the domain at one of the root servers e.g.
However, there are occasions when a registered domain is not in the root servers, e.g when has the status REGISTRAR-HOLD. You will need to check in Internic's whois server to determin this. If you direct your software to try a whois search at whois.internic.net you can find if they have an entry for the domain. As they are the registry for the GTLD's you list above, if they don't have it then it's not registered. Note, this will not work for the CCTLD's you have listed. You will need to check with their respecitive registries' whois servers to find whether they are registered or not.
Sorry for the length of this but the lack any standard model for registering and maintining domains among the registrars and registeries, compounded by the multiplicity of ways domain can be used and the various states they can get into makes it actually quite tough to determin in all cases if a domain is registered or not.