When you can not type a character in the terminal



Update: This topic has been replaced by this updated version:

This post is about the problem where you find that you can't type certain characters in the terminal.

The courses that this has been reported in:

  • Learn the Command Line
  • Learn Git
  • Learn Rails

The characters that have been reported are:

$ | space ~ ' "

Various solutions

These are not in any particular order.

Option 1: If you can, try a different web browser.

Option 2: Use your Alt key combined with the ASCII code for the problem character.

Character   Alt + ASCII code
    $           Alt + 36
    |           Alt + 124
  Space         Alt + 32
    ~           Alt + 126
    '           Alt + 39
    "           Alt + 34

Option 3: Use the on-screen keyboard.

Option 4: Change your keyboard input language to American QWERTY -- you might need to find a link or two on how to do that.

Option 5: Copy and paste the character.

Can't type the ' | '
Can't type | (pipe) in terminal
It seems impossible to introduce the | symbol, Exercise 6/13
2. Nano Press Enter to write the file name
I can't type "~" in mac
Stuck at 77%
Can't type in spaces with Chrome
Stuck in the Command Line: echo "Hello"
Command Line 7% - Space Bar Issues
Command Line 7% - Space Bar Issues
Can't add quotation marks in terminal
Cat volcanoes.txt | wc | cat > islands.txt
I can't hit space
Cannot write | in the command line
I CanΒ΄t type | in the terminal
Stdin, stdout, and stderr, I can't type ">"
Exercise 6/13

@albionsrefuge I edited it some, more to see how editing someone else's post was than because anything really needed fixing :smile:
I wasn't really sure about #3, though. Was the "find a link or two" a note for someone to add a couple links into the post on how to do that, or was it advice for the person having trouble?
Thanks :)


Soon, Discourse should have Markdown table support, which we could use to format that keyboard shortcut list :)

(talking about when tables will get added to Discourse)


That looks great! I didn't know about the kbd code - very nice.

About option 3, I like your solution, better than us posting links that could get stale.


None of the options work for me


What browser/operating system combination are you using?


Hi all,
I was using a very old black macbook (2007). Solved:) by copied and paste.
I think the problem is that it can't be actualitzated to the new operating sistems. I tried with safari and firefox.


Thank you for getting back to us with the solution that you've found. I've added it to the options for others to try.


I have the same issue in the exercise 2/11 in the learn command. I can't write "~". It is strange because in the Python course I can paste both: "|" and "~".


I agree. Likely there is someone who knows "why" this happens, but that isn't me. :interrobang:


copy and paste won't probably work in the command line because it doesn't allow you to copy and paste.


I have had it not work for me too, maybe on my Windows machine, but I can't test to confirm right now. On OS X with Chrome, copy/pasting in the command line is not a problem.