Operating on Console CLI

General support questions
Post Reply
kumaramy
Posts: 1
Joined: 2019/04/04 17:07:47

Operating on Console CLI

Post by kumaramy » 2019/07/11 17:08:03

Hello.
Recently I started using Console Mode or CLI mode which has black background screen and not any GUI. So, I want to know, how do i copy and paste a line from one console to another? Let's say I press up arrow key so the previous command appears on console. So now, I want to copy that entire command and paste it to another console by switching AlT+F2. So, how should I do that?

hunter86_bg
Posts: 2019
Joined: 2015/02/17 15:14:33
Location: Bulgaria
Contact:

Re: Operating on Console CLI

Post by hunter86_bg » 2019/07/11 18:23:26

You can use the following bash shortcuts:

Code: Select all

Ctrl + e
- Go to end of the line

Code: Select all

Ctrl + a
- Go to the begining of the line

Code: Select all

Ctrl + u
- Cut the line from the cursor to the begining of the line

Code: Select all

Ctrl + k
- Cut the line from the cursor to the end of the line

Code: Select all

Ctrl + y
- Paste the previously cut line

Many more can be found on the web

desertcat
Posts: 843
Joined: 2014/08/07 02:17:29
Location: Tucson, AZ

Re: Operating on Console CLI

Post by desertcat » 2019/07/12 21:09:28

kumaramy wrote:
2019/07/11 17:08:03
Hello.
Recently I started using Console Mode or CLI mode which has black background screen and not any GUI. So, I want to know, how do i copy and paste a line from one console to another? Let's say I press up arrow key so the previous command appears on console. So now, I want to copy that entire command and paste it to another console by switching AlT+F2. So, how should I do that?
Good Afternoon Ya' all. I'm back. I finished the move and now have the new apartment so that you can now walk from one end to the other without tripping over a box or some item. My workstation took more than a few days just to find all the cables, parts, monitors, etc., then discovered that the computer had loose wires (from the move), that needed to be fixed, but now I'm up and running.

OK. Your post kind of mystifies me: WHY exactly don't you have a GUI of some sort?!? We live in the Age of 1 TB SSD's that you can pick up for dirt cheap. Yep, you can work from a straight CLI, but WHY?!? You create a lot of unnecessary work for yourself. Even IF you wanted to run ONLY from a CLI, so long as you have a GUI shell, and a few Virtual Desktops, the easy way to do what you want is to simply highlight the command, copy it, move to another Virtual Desktop, hit Paste, and finally Enter.

OK suppose you don't want to to run some goofy GUI, then at *least* do yourself a favour and download a nifty utility called Midnight Commander (mc) [yum install mc] it will make your life a lot easier as it can do what you want and so much more.

Best Fishes

Post Reply