The terminal remains the primary way the majority of Linux users interact with their computers. Nothing is perfect, though, and sometimes even the terminal can stop responding or ignore your input. If your Terminal freezes and you can’t type on the terminal, here are some of the most prevalent causes and their solutions.
Is the window in focus?
There is a slight chance your problem could be easy to fix: is the terminal window active?
If the terminal window is not in focus, anything you type won’t appear on it.
Another possible source for this problem can be some background applications that continuously steal the focus. Check if, for example, you have a pop-up notification that could take the focus away from your terminal.
Finally, if you’re using KDE, there’s a minimal chance of a poorly set-up window-management rule. Such a rule could, for example, never give focus to your terminal or have it show up in a predefined position, with an unusable size, or even minimizing automatically.
Are you entering a password?
If your terminal looks frozen while you’re trying to enter a password, don’t worry, as that’s normal! You may be used to seeing asterisks or dots elsewhere while typing a password, but on the terminal, it will show nothing.
Thus, you can ignore that the terminal looks frozen, type your password, and press Enter.
Is something already running in the background?
Some processes take a significantly longer amount of time to complete than we originally anticipated. If your terminal looks frozen and doesn’t respond to input after entering a command, it may not have finished what it was supposed to.
Try pressing Ctrl + Z in your non-responding terminal to suspend any active task. If your terminal works after that, then you know the cause of the issue. You can make the application run in the background by typing
Alternatively, by pressing Ctrl + C, it will send a stop signal and try to exit the application. Stopping the app will obviously also prevent it from doing what it was supposed to be doing.
Is it a remote shell?
If you are connected to a remote shell using SSH, a frozen terminal is often due to a connection problem. For example, if you connect to a VPN, the current SSH session will become unresponsive.
The fix is simple: try terminating your remote session and logging in again. If that doesn’t work, check your Internet connection or Firewall.
If none of this works, try rebooting your computer and router.
Is your problem somewhat different, in that, you can connect, but your terminal freezes after some time? That’s (probably) a connection problem. The difference is that, in such cases, there’s not much you can do: it’s probably the network infrastructure that’s to blame.
In such cases, you can only contact your Internet provider, explain your problem, and ask if there’s any way around it. The solution could be as easy as swapping out your existing modem/router for a new one, or, in a worst-case scenario, replacing some piece of problematic cabling somewhere between your home and your Internet provider.
Is the problem only about some letters?
If you can type in your terminal, but it’s only specific letters that refuse to appear, maybe your
.inputrc configuration was somehow corrupted. You may have mistyped a parameter in the past, which ended up filtering out specific characters.
Use your favorite text editor to check out “~/.inputrc” and “/etc/inputrc” for any mistyped parameters.
As to what you should look for, unfortunately, that’s where we can’t help, since we don’t know what you typed before. Maybe checking out your Bash and sudo history would help.
If you’ve tried everything up to now, but your terminal is still unresponsive, maybe you should try to reset it to its default settings.
Alternatively, you can try another terminal application, like Tilix.
Did you check the keyboard cable?
We left the most obvious possible cause for last since it sounds outlandishly impossible. How could someone not notice the whole keyboard isn’t working? And yet, it’s happened before! Check your keyboard cable to see if it is loose or if your keyboard is faulty, which explains why you can’t type in the terminal.
Those were some of the most widespread problems that can make a terminal unresponsive and the ways you can deal with them. If you are having an issue opening terminal instead, here are the fixes.