Written 29 Aug 2026. This is a how-to, not a product card.
Rename or move a file
After SSH works, rename or move a file with mv so the name matches the job. The old name is gone. You don't need a NAS for this.
Copy a file without leaving the computer leaves the original sitting there. Tonight you want the same file under a better name, or in a folder you already made. mv is move. It is also rename. Same computer, one file, new path. Useful after make a folder, so the spare is not still sitting in home. The computer does not need a desktop, a NAS, or a file manager app for this one job.
Skip until SSH already works
SSH from the couch should already get you a prompt. If you want a second copy and the original to stay, that is copy a file without leaving the computer. If the file is still on the laptop, that is copy a file to the computer from your laptop. If you only want to sit in a different folder, that is move into a folder. Skip this whole note if you only need a house share other computers browse. That is a folder the house can open.
What this is
mv gives a file a new name, or puts it in another folder. You run it on the computer, after SSH. The old name is gone. That is the whole difference from cp. It does not change which folder you are sitting in. That is cd. It does not talk to the laptop. That is scp. It does not share the file with phones. That is Samba. Two paths, same computer, one file.
Give it a better name
SSH in. If you don't already have a throwaway file, make one in home:
echo 'hello' > ~/hello.txt
Then rename it:
mv ~/hello.txt ~/hello-keep.txt
The first path is the name you have. The second path is the name you want. Swap the names for yours. A short name with no spaces is easier to type later. Want the original to stay too? Copy first: copy a file without leaving the computer.
See that the old name is gone
List home:
ls ~
You want hello-keep.txt. You don't want hello.txt any more. Optional look at size and date:
ls -lh ~/hello-keep.txt
Optional peek without opening the editor. That print command is read a file without opening the editor:
cat ~/hello-keep.txt
You want the same line you wrote. The computer moved the file. It did not make a spare.
Move it into a folder
Need a folder first? Make a folder. Then keep the same filename and drop the file inside:
mv ~/hello-keep.txt ~/notes/
The trailing slash on notes/ is a reminder that the last thing is a folder. List it:
ls ~/notes
You want hello-keep.txt in that folder. List home again. The old home name should be gone. A full second path also works if you want a different name in there:
mv ~/hello-keep.txt ~/notes/hello-later.txt
Sitting in the folder yourself is a different job. That is move into a folder.
Optional: ask before overwriting
If the new name already exists, a plain mv replaces it with no useful undo. Ask first:
mv -i ~/hello-keep.txt ~/notes/hello-keep.txt
The computer will wait for a yes if that second name is already taken. Type n if you did not mean to replace it. Skip mv of anything under / or /etc. Home is the practice place. Skip SSH settings tonight.
What this is not
This is not a second copy. That is copy a file without leaving the computer. It is not a file from the laptop. That is copy a file to the computer from your laptop. It is not changing which folder you sit in. That is move into a folder. It is not a house share other computers browse. That is a folder the house can open. It is not a checked backup. That is a backup of the folder.
What next
Need a spare before you rename? Copy a file without leaving the computer. Need a folder for the file to land in? Make a folder. Need the names again? See what's in a folder. Need to change a line? Edit a file from the couch. Need the throwaway gone for real? Delete a file carefully. Need a file from the laptop instead? Copy a file to the computer from your laptop. Tired of retyping the same long line? Reuse a command you already typed. When key login is boring on every computer you use, turn off password login once the key works. Keep SSH on the house network: keep the computer on the house network. Don't forward port 22.
Skip
- Skip if SSH still fails. Finish SSH from the couch first.
- Skip
cpif you want the old name gone. That tool leaves a second file. - Skip
cdif the file is what you want to move. That tool only changes where you sit. - Skip buying a NAS, a “cloud drive,” or a file manager app to rename one file.
- Skip
mv /, anything under/etc, SSH settings, orrm -rf. Deleting one practice file is delete a file carefully. - Skip opening SSH to the internet so you can rename files from a coffee shop. That is keep the computer on the house network.
Sources
GNU coreutils: mv invocation. Debian: mv. Ubuntu: mv. Official pages only. For the login, see SSH from the couch. For a spare that keeps the original, see copy a file without leaving the computer. For making a folder, see make a folder. For listing names, see see what's in a folder. For sitting in a folder, see move into a folder.