Copy a folder using CLI in Linux

Copy folder using command line

This is an example how to copy a  folder using the command line. i.e I want to copy the folder ‘Aqua’ on my desktop to /usr/share/amsn/skins. What is the command using the terminal?

sudo cp -R ~/Desktop/Aqua /usr/share/amsn/skins/

Sudo is because you need root privileges to write something outside your home directory.

~ Stands to be a shortcut to your home direcory. You can use it as it is.

cp is the “Copy” command. -R is the “recursive” option which means “copy the folder and it’s content”.

You can also use this method to copy to a network share if you have already mounted it, an example of how to mount a share using CLI can be found here