I am aware of Ctrl+L on bash terminal (using it on Ubuntu) which clears the screen by applying appropriate scrolling on bash terminal. After learning that the terminal is by default set to emacs mode and that I have been using vim on the rest of my programming life, I wanted to shift to vi editing mode on terminal by using: set -o vi. But it seems there is a learning curve here too. Here is my simple question:  How to clear the terminal in vi mode?  On a parallel note, am I right if I assume that every (at least the most used) command in emacs mode has equivalents in vi mode? Clarification of similarity: There seems to be a similar question --  Which asks to force Ctrl+l as well to work in vi mode. But clearly, it doesn't clarify whether is an existing/default way of clear-screen operation, in vi mode!!  So, I reckon its a different question. P.S. : Update: As @Gilles pointed out, the Ctrl+L seem to work in command mode of vi style editing. That means we have two possible ways to clear the screen of a terminal in vi mode:  From the default insert-mode, we should press Esc to move to command-mode and then use Ctrl+L.  Use the answers in  to get Ctrl+L working directly in insert-mode   My current question requests to explain any method other than the two, possibly native to insert-mode.
124142
When you press Ctrl+L in bash default mode the screen is cleared. But when I run set -o vi and press Ctrl+L the keystroke is printed (^L). Is there any way to keep this behavior?
90612
When using Terminal.app, you can clear the screen by using the shell builtin clear or by pressing ^+L (Control-L).   However, all this does is push the current screen content back one screen height and reset the cursor/input at the first line. Meaning you can still scroll back and see it.  What you are also able to do, is reset your entire scrollback by pressing ⌘+K (Command-K).   After you've done this, you cannot scroll back at all.  In certain situations (notably, before running screen or vim), I'd like to reset the scroll back before the command actually executes.  Is there a command (like clear) that is implemented in OS X that allows me to do this? Given the existence of pbcopy and pbpaste, I'm thinking something similar might exist that will allow me to do this.
87833
I switched to zsh completely on a previous arch install and I LOVED it mainly because arch is one of the distros that capitalizes your Documents, Downloads, Music and such directories in your ~ directory. Since I wasn't used to that and I use tab completion for almost everything in the terminal zsh was like heaven for me compared to bash.... I swear this feature used to be active automatically because I don't remember having to tweak anything to make it work that way. I probably figured it out on accident. xD But I would greatly like to have this feature restored on my new pc using zsh as my main shell, and if anyone knows how to do this I would really appreciate a reply. I tried activating every option in the completion configuration and that didn't seem to do the trick... so that brought me here. PS: I used to be a lot more up to date with my Linux know-how, and my knowledge has grown stale... I'm trying to remedy that... (without the use of the shift key, as much as possible... haha)
36324
When we want to open an application or file from the terminal, we type, say,  okular file.dvi   This opens the application, but also shows the status of the application. We cannot close the terminal, because it kills the process. Unfortunately, if you're trying to, for example, create a LaTeX file, you will need one tab for the text editor, one for the dvi file, and so on. And if you're trying to open all windows from the terminal, you can forget it. I'm trying use the terminal as much as possible, and while I have Yakuake, it is still a bother having so many tabs and seeing which of those have an application I've killed and so on.  So, is there a way to open an application/file from the terminal so that the status doesn't show and immediately gives the prompt so that we can use it to open more applications?
121768
I'd like to do a one line bash command that automatically does this:  screen -S myserver  python myserver.py  # inside the new screen CTRL A, D (detach)   I think this won't work:  screen -S myserver &amp;&amp; python myserver.py   because python myserver.py won't be started inside the screen.
13591
I am confused about how Ctrl-key combinations work in terminal. In bash man page, there are various combinations such as:   C-e - go to end of the line C-f - go one character forward   etc.  But then there are some undocumented shortcuts such as:   C-j (OR C-m) for return key. C-h for backspace C-i for tab etc.   Are these shortcuts just forgotten to be documented? Or, because   C-j is LF C-m is CR C-i is Tab   in ASCII, is this somehow a "default" behavior? In other words, is the behavior for C-j, C-m and C-i not implemented by bash but by something else?  Another question is, when I press C-v and left arrow key, ^[[D appears on screen. I.e, ESC-[-d. But when I press ESC-[-d, the cursor does not move left. What is the reason for this?  EDIT:  Initially, I have thought that when I press C-j, the keyboard directly sends 00001010 to kernel. But then I decided that this is not the case, because using programs such as xev or evtest, I have observed that key presses to Control and j appear as different events. So when I press C-j, the keyboard does not send 00001010, but probably multiple bytes. Then where the conversion of these multiple bytes to 00001010 is done?
70861
How can I minimize the Terminal window using a command? For example: I use the clear command to clear the terminal output, which command can I have to use to minimize the terminal window?
108898
Please, i need someone to help me in making a very simple bash script. The job of this script is just to press a certain combination of keys on the keyboard.  My objective is to create a script that would turn off the Kubuntu desktop effects completely. The key combination for that is: "Left-ALT + Left-Shift + F12". I am aware that there is a widget that might do this job, but i am trying to learn how to accomplish it with a bash script.  I have tried to do an online search but i guess i was choosing the wrong set of keywords. I did not manage to reach a tutorial or a reference that would mention this task.  Thanks in advance for your help!  P.S: Any suggestions, references, notes, comments or tutorials would also be greatly be appreciated.
97086
I used to use cmd back in windows, and the command line I used a lot, was cls. It's kind of like the clear command used in Linux, but it cleans the screen permanently.  If you use the clear command, it just scroll down, so that you don't see the command you where working on.  I like both a lot, but my question is, how do i get a cls like command, that clears the screen, and can't browse up, to see the command you where working on?
65701
How can I scroll in bash using only the keyboard? If it's not possible in bash, are there any other shells that support this?
92997
When I press Ctrl+Alt+F1 it goes to virtual terminal. What is this virtual terminal for? When do you need to use it?
2718
Is there a way to tell the terminal not to wrap long lines. I wish to see a line in the same space without wrapping to the next one. I do not care if I can not see the end of the line just as long as the line stays in one. A horizontal scroll would be good for this also but for the moment the removal of the wrapping is what I need.
59738
I am running the latest version of Linux Mint with Cinnamon. I'm trying to map Caps Lock to Ctrl, but I cannot figure out how to do it. All web searches I've done have led me to older versions of Linux Mint (there is no keyboard layout option in my settings). How can I do this?
95561
I often use the ⌃+O shortcut in bash (from ):     [G]o back to [a command in history] and press ⌃+O instead of ↩. This will execute the command and bring up the next command in the history file. Press ⌃+O again to enter this command and bring up the next one.   It seems this shortcut is not available on OS X; ⌃+O simply does nothing. A web search turns up the , but I don't see how I can accomplish the same thing as ⌃+O with it.  Is it possible to somehow get ⌃+O behavior in Terminal.app on OS X?
18596
I know I can use Up to iterate through previous commands. Running the last command simply involves Up + Enter. However, I was thinking of buying the  as I spend a lot of time in vim.  This keyboard has no arrow keys, and the only way I know how to get this kind of behaviour is by pressing Ctrl + R and beginning to repeat my previous command.  Is there an easy way to emulate Up + Enter in an UNIX terminal without the arrow keys?
109476
It seems a bit counter-intuitive to me that in many text editors / IDEs, pressing Ctrl+C with nothing selected, clears your clipboard, or replaces it with whatever is on the same line as the caret.  Is there a standard for dealing with this behaviour?
21593
When you drop to the terminal via Applications -&gt; Terminal or Ctrl+Alt+F1 etc. bash is used by default to interpret your commands. If you wish to use another command interpreter (like zsh or fish), how do you get this to start as default?