How to reverse a shortened URL with a single command on GNU/Linux

Remember that old saying: if you don’t know the source, don’t click it? With all these new URL shortening services, that advice seems to have been thrown out the window. As a result, evildoers are embracing the technology to disguise their malware sites behind shortened URLs. This is obviously effective as an URL like hxxps:// would have a much easier time getting past your spamfilter than say something like hxxp://h4x0r.tld/inject.aspx