Problem:

I need to write a virgulilla (~) but I don’t know how to do it.

Solution:

You can write the virgulilla (~), it doesn’t matter if your keyboard layout is Spanish or another’s language

Step by step:

Use any of these ways:

  • In Ubuntu using windows keyboards, press Alt+ñ (Spanish layout).

  • In macOS on U.S. International - PC layout, press Alt+N and then Space.

  • In Ubuntu, hold down together: Alt Gr + 4.

  • In Ubuntu, hold down together: Ctrl + Shift + u then a underlined u letter should appear. Release keys. Enter 7E(Unicode for ~), press space or Enter.

Source:

https://superuser.com/questions/467398/how-do-i-exit-an-ssh-connection

https://superuser.com/questions/190025/how-can-i-type-tilde-in-the-ubuntu-terminal-with-a-norwegian-keyboard