Resources on how to use CLI, copy/paste

Ubuntu Version:

Desktop Environment (if applicable):

Ubuntu 22.04.05 LTS
Problem Description:

Im painfully new and am looking for resources on how to use ubuntu cli to educate myself. I have a goal of creating a media server on a cheap pc that is wiped and only has cli on it.

Relevant System Information:

Screenshots or Error Messages:

This is one of the problems i am having. I cannot find how to copy and paste off cli. The searches ive done seem to show ctrl shift c but it does not function.

What Iā€™ve Tried:


At this point in looking thru the forum it seems to be mostly average users to advanced or gui users. Am i even in the right place?

Hi and welcome.

This is a great resource to learning the command line. It is searchableā€¦
http://www.linuxcommand.org/tlcl.php

For copy and paste, for example, if you want to copy something in the terminal over to a notepad, or vice versa, you can use your mouse to highlight the line, and then use your center mouse button to paste. There are probably 1000 ways to do this, but thatā€™s how I do it.

1 Like

What does ā€˜does not functionā€™ mean? That is the copy part so you need to do the paste part which is explained at the site from the link below. Have you done that? You can also simply use the cp command, does that function?

https://itsfoss.com/copy-paste-linux-terminal/

1 Like

Welcome to Ubuntu Discourse :slight_smile:

There are so many good resources to choose from.

This is one place to start:

We donā€™t know what kind of media server you are interested in but I do see a lot of users talking about Jellyfin:
https://www.geeksforgeeks.org/how-to-install-jellyfin-media-server-on-ubuntu-22-04/

You are definitely in the right place to ask questions and get help.

2 Likes

Thank you aljames for the resource ill take a look at it.

Laptop. Mousepad with 2 buttons. I did try and left click and slide across the pad to highlight or was hoping a left or right click would open a panel. But this is not the gui or windows. So keyboard it is i guess. I was also thinking maybe the Ubuntu version didnā€™t have every tool one might want or need and im missing some?

I did update so it should be current.

I see. There are other ideas here you could look through and test.
https://askubuntu.com/questions/961175/copy-and-paste-doesnt-work-in-the-terminal#961226

1 Like

Thank you yancek, that article is almost identical to the one i read but it was the reverse order. It explained why the control C cant be used then dived into the 2 versions of copy and paste.

What i mean by does not work is just that. I have a log i need to copy and paste on a website

( yes i do think its funny but not funny that im asking for help on how to use linux to solve my issue on another linux site. But its their script? So troubleshooting the log might be easy for anyone but i know the person who wrote it knows the answer. Didnā€™t know i couldnt copy)

And when i press control shift and c nothing happens. I tried sliding mouse i tried arrow keys. How do i navigate off the prompt up to the log and highlight it?
I also tried control insert. Nothing happening there either.

So now im taking a beat because every problem begets another and another and now im just floundering around. I need to get some direction. That link looks like it has some good info past the copy paste so ill be going thru those as well. Since i really need to know my way around. I did try reading and watching a bunch of tutorials but that started to become repetitive and not productive in moving forward. Figured learn by doing so just start and search to find what you need.

My biggest hurdle is that most of my searches seemed to return gui based results. To be honest i didnā€™t even know linux had a gui. Ill be replacing windows on an old tablet so i can see how that is.

Back to searches. Cli is same as terminal correct? Which just to clarify that i am indeed talking about the correct distro of Ubuntu.

My screen is black with white letters and has the username and directory followed by :/$ and you have to type everything begining with commands right?

I feel like google search has been ignoring the cli part of my search parameters. So here i am. Lost and confused and just feeling like this is THE simplest thing in all software and its some little stupid thing im not aware of like"is caps lock on? Cause if caps lock is on it wont work". Lol

So far its all been like that. Follow the tutorials to set up Ubuntu, followed a really good tutorial on installing proxmox and creating containers and virtual machines. Thats where im doing this server. Adding Ubuntu and the server files and have been typing the commands as it spelled out. Going fine. Then instructions say create this directory then give yourself permissions. Well i know how to create the directory lets look up how to add permissions, turns out i have already used that before just didnt know. So thats how ive been learning backwards into linux.

In the middle of this my ram failed and i had to start all over. Did have some issues the second go and now im writing it all down as i go to kinda have a reference guide. Last week i was stuck trying to pull a script from git into nano. Took awhile but i figured a way. Not a direct way but i did learn some new commands and learned the why the command i was trying to use was going to the web but not all the way to the git file.

It is a convoluted way to learn, but i am learning and also will have accomplished something useful at the end.

Thank you rubi1200, that is infact one of the pieces in the server. Im learning all kinds of stuff. Its slightly unsettling. One of the apps? Scripts? Files? Programs? Not really sure what you call things like jelly fin but one was stuff i thought was only darkweb/hacker/pirate stuff, turns out its just a way to share over the web. Demystifying quite a few things when you look under the hood.

So unlike other forums im not feeling like this is organized to where i am confident im in the right place. Would this be the appropriate place to ask my basic beginner questions?

Hi there,

Your title wasnā€™t very specific, so I fixed it for you. In the future, just take care that your title matches what you want to ask.

Thanks! :slightly_smiling_face:

1 Like

Yes, of course :slight_smile:

This is a volunteer, community-driven platform and there are users with all different levels of experience and knowledge.

All questions are welcome.

1 Like

Nothing is expected to happen. Iā€™m not sure what or how you are trying to copy. If you type a line such as ā€˜this is a testā€™ at the prompt in your terminal, then hit Ctrl+Shift+C nothing happens until you hit Ctrl+Shift+V which will simply copy that line in your terminal so it will show twice. So what are you trying to copy and where are you copying from an to?

After reading thru all the various supplied materials i was teased several times about copy and paste. The instructions are always given and at most the highlight instruction was for using a 3 button mouse.

Obviously the answers i get depend on the questions i asked. Its clear now i failed miserably to formulate my question to get the answer i need.

The best i found was in the nano editor where it was detailed that using a keyboard you could set with control + A and then highlight with directional buttons then iirc control + 6 to complete copy.

If that works in the Ubuntu terminal that is halfway to solving my problem.

So my first question should have been how do i select text and highlight to copy.

The next part is if i run the log say for gluetun it will show those results and the cursor is now back again blinking in the command line awaiting input.

How do i set, highlight and copy the gluetun log that is above so i can paste it on the web? From the help provided it seems the control + V will paste there.

Sorry for not knowing that my question wouldnt intuitively imply the keyboard only part. I do have a laptop that has the mouse pad and a left and right button but as of yet i have not been able to highlight anything. The one time i did find a command it just printed ā€œ[ā€ so apparently i dont have that function or i hit wrong keys, i tried several times to the same result.

Hope this provides a better understanding of my difficulties. Thank you all for trying to help.

Do I understand you correctly that youā€™re running a server system completely without a GUI (console only) ? Then copy and paste does not really exist at this level. You can run gpm (general purpose mouse; itā€™s in the repositories, so ā€˜sudo apt-get install gpmā€™ should install it) to get a mouse cursor and a X-like select-and-paste mechanism on the console (left mb to select, middle mb to paste; on a device with only two buttons the right mb will do paste and the function normally mapped to the right button (extend selection) is not available).

Beyond this thereā€™s the kill-ring in the command line editor for cutting and pasting in your input. Ctrl-k kills from cursor to end of line, ctrl-u kills from cursor to the beginning of the line, ctrl-w kills from the cursor to the beginning of the word; hitting ctrl-w multiple times will not be seen as starting a new item but will add the word to the text already in the current item. Ctrl-y ā€˜yanksā€™ the last kill back into the line, Meta(or Alt)-y allows you to replace a yanked kill with the next older kill (this can be done repeatedly, all killed bits of text sit in a ring buffer; do Alt-y often enough and youā€™ll get back to the most recent kill). I should probably also mention that the command line has a history feature. The cursor-up and cursor-down keys allow you to move back and forth in the history and you can use ctrl-r to do an incremental backward search in the command history.

Another thing to remember is that anything a program prints to the console can be put in a file by using redirection e.g. ā€˜ls -l /var/log/*.gz > packedLogs.txtā€™ will give you a detailed listing of compressed files in the log-directory in a file named packedLogs.txt. You can then load that file into an editor and do whatever is needed.

Another way would be to set up an ssh-server on the console only machine and then work on the server from a client with a GUI using an ssh client.

3 Likes

Yes!!! This is why i have been failing! Thank you. This has been the most difficult part is not knowing what
I donā€™t know. The first solution sounds like the most normal/ familiar setup. Ill give it a try. Thank you.

If i understand this then that is what i am doing. My server/pc has monitor and keyboard. This only has linux and proxmox on it. I wiped windows and everything else. Im connected with a laptop and this where im trying to copy logs from linux terminal then swap over to windows to the forum and paste. Apparently im to use pastebin to do this but so far ive not been able to do that as we now know why.

At the risk of muddying up this confusing stew Iā€™ve made, would this have been easier or possible to do if i had this running in a linux gui vs a windows OS laptop?

Thats my next step is to use an old tablet, setup ubuntu gui and test the learning curve from windows to that OS. It seems like a lot of the searches people opened the terminal on their gui and had all the mouse operations available. Im not doing it exclusively for that reason but it sure would have avoided this if that is the case.

Thank you again. Lol mark this as resolved, its working!!! Fantastic!!!

1 Like

You should mark the post from @hdd-gehrke as the solution. Not only does it give others credit but also helps if someone else is looking to resolve the same or similar issue.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.