Just hold down ALT and type 0241 on your numeric keypad and you will get a nice ñ printed for you.
ALT + 0241 = ñ
And capital Ñ is:
Alt + 0209 = Ñ
Found this info on this page here with all the characters you could want.
On Ubuntu (Linux):
Go to System -> Preferences -> Keyboard and change the Compose key to something you don’t use like your right windows key.
Here is a screenshot of doing the setup.
Then you can type:
Compose key n ~ to get ñ
Compose key e ‘ to get é
[tags]ñ, Ñ, tilde, accents, keyboard shortcuts, ubuntu, compose, enye[/tags]