I have several reasons to think that my terminal behaves like a console.

I use GNOME Terminal 3.18.3.

When I open vim from my terminal on fedora 23, the following warning is emitted: "Vim: Warning: Output is not to a terminal".

When I open the manual for a command, it does not switch the terminal in "reading" mode. What I mean by that is that it does not put me on the manual page where I could scroll using HJKL and quit using q. Instead, it just prints the content of the manual as the result of a command like ls in one fell swoop.

Commands like ls are not colored.

I think this happened after I tried using my computer using Ctrl+Alt+F3 (from the console).

How can I set my terminal back to its previous state?

  • A console interface is a terminal so to understand your problem, please specify how you access it. – Julie Pelletier Jul 22 '16 at 5:17
  • I use GNOME Terminal, the default graphical terminal of fedora. I launched it from the graphical interface. – MMCXCVII Jul 22 '16 at 5:22
  • @MMCXCVII 2197? – andy256 Jul 22 '16 at 5:37
  • @andy256 something you <<8? – Jasen Jul 22 '16 at 5:46

You are likely (attempting) to redirect the output of your shell to a file, e.g., something like

bash -i | tee foo
$ vim
Vim: Warning: Output is not to a terminal

While you can read (most) commands from the keyboard via that approach, the output is no longer a terminal. You can recover by closing that shell and capturing output in a different way: the script command can capture output sent to a terminal without interfering with it. For example

script -c bash foo

will write all of the text sent to the terminal while running that bash command, and the output will still be a terminal (rather than a pipe or a file).

Further reading:

  • Where is the redirection supposed to be? I checked the file .bashrc and .bash_profile and did not see any mention of the redirection you mentioned. Also, it might be useful for you to know that when I login from the console (using Ctrl+Alt+F3), the following appears: -bash: sh/zsh: No such file or directory – MMCXCVII Aug 6 '16 at 9:31
  • And when I open a terminal window, before anything the following appears: cat: /tmp/x: No such file or directory – MMCXCVII Aug 6 '16 at 23:30
  • That is likely in your .bashrc or files that it sources. If you are unsure about that, you could rename your .bashrc file temporarily, and open a new window. – Thomas Dickey Aug 6 '16 at 23:35
  • Thank you very much, I renamed .bashrc and .bash_profile and all the warnings have been removed. In addition, I can see manual pages normally. I will remove the lines of code I am unsure of one by one to see which one was the cause. – MMCXCVII Aug 6 '16 at 23:39
  • Great solution, is there any way to separate output for stdout and stderr? – calbertts Jan 2 at 11:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.