Results 1 to 5 of 5

Thread: copy text in tty

  1. #1
    Join Date
    Mar 2020

    copy text in tty

    Hi I didn't used to terminal by this time.
    I do not understand clearly how to copy text from tty
    I have standalone computer with several disks and need copy uuid of them and paste to fstab.
    I do not understand how to do it without GUI, btw, I just curious, does ubuntu provide this possibility, to copy some random text from text only terminal window without mouse?
    in few words - I have only text terminal, and bunch of lines on it, is it possible just move cursor to some random line and copy text from it without mouse?

  2. #2
    Join Date
    Nov 2008
    Metro Boston
    Kubuntu 20.04 Focal Fossa

    Re: copy text in tty

    Most terminal programs support highlighting the text with a mouse, right-clicking, then using copy/paste to copy the on-screen text.
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  3. #3
    Join Date
    Nov 2011

    Re: copy text in tty

    This link with two alternatives may help you get started.

  4. #4
    Join Date
    Mar 2010
    Ubuntu Mate 16.04 Xenial Xerus

    Re: copy text in tty

    i usually send the command output both to the screen AND to a file, then edit the file to get the data needed, then scp the file to a normal Linux desktop for use as needed. 99.99999999% of the the time, i avoid using consoles for the lack in select-paste. Always prefer using ssh connections. it is just like being there almost always.

    For example:
    $ lsblk | tee /tmp/log
    if you need some remedial redirection-fu tutorials, find any basic bash or CLi linux book ... or search for "the art of the command line" - there's a github gist/page about it.

    BTW, that example can be modified w/ sudo to create/append to an existing system file quickly.
    $ echo "" | sudo  tee -a /etc/hosts
    That can drastically reduce privacy problems for a desktop.

  5. #5
    Join Date
    Dec 2014

    Re: copy text in tty

    By default there is no copy and paste in the virtual consoles. If you have a mouse connected to the machine, gpm (general purpose mouse) provides that capability.

    Otherwise you can use a terminal-multiplexer like screen or tmux. These work like a window manager for a terminal.

    In screen 'ctrl-a Esc' starts copy-mode. You can move the cursor and use space to mark the beginning and end of the text to copy. After that 'ctrl-a ]' inserts the copied text.



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts