When in the 'lower level terminal' (not sure how this is called), the one opened by pressing Ctrl + Alt + F1, how can I copy the content of the command I used there, since there is no mouse and I can not move my cursor out for the command line?
You could just redirect the output to a file with
By the way, a couple notes:
To send the output of a command to a file, you can use redirection.
For example, you could send your
Then the output will write to that file instead of the screen. When you come back to the GUI, you can find the file in your Documents folder and access the contents.
The last used command history is usually stored in your history file (
As for manipulating the command-line of the console window, you can rely on the command line editing functions of the bash shell. They are discussed in the READLINE section of the Bash manual page (
Another way to work around this is to use the screen utility. There are several introductory tutorials on the web. Screen has a copy and paste function:
There's several ways to go around this. The simplest is with
hbdgaf's answer presents one solution - redirection. Here's two variations on the theme - redirection with named pipe and
Option 1: named pipe
When you run a command and use pipeline
Here's the steps to make it work:
Option 2: shared session in byobu
Option 3: xclip, the easiest way
Suppose I wanted to copy output of
And it will be already in your GUI clipboard !
There's a small catch however -
Of course typing all that in can get repetitive, so you can create a
And you'd run it as
Option 4: script
There exists a command called
However, there's a drawback - the output file may contain special characters. Reffer here for info on how to clean the output up
Option 5: /dev/vcsX
As shown by Giles from U&L site, one can actually dump contents of tty onto another terminal's stdout. Suppose we want to dump tty2. The command for that is
Draw back of this method is that if your terminal is set to certain level of scrollback lines, you can get only partial output.
GPM is just what you need & very useful. While in the console (