Updated: 28 September 2026 · Applies to: AlmaLinux 9, Rocky Linux 9, Ubuntu 24.04 and Debian 12

Everyday commands for working with files and folders on Linux:

mkdir dir                 # create a folder
mkdir -p dir1/dir2        # create nested folders
cd dir                    # go into a folder
cd ..                     # up one level
cd -                      # back to the previous folder
cd                        # your home folder
pwd                       # show where you are
cp file1 file2            # copy a file
cp -r dir1 dir2           # copy a folder with its contents
mv old new                # move or rename
rm file                   # delete a file
rm -r dir                 # delete a folder and everything in it
ln -s target linkname     # create a symbolic link

Note: rm does not use a recycle bin. Double-check before running rm -r, especially with wildcards.

Related services

KVM VPS hosting

NVMe SSD and full root access, with Free Basic Managed Support.

Unmanaged dedicated servers

full root access and free IPMI KVM, with Free Basic Managed Support.

Managed dedicated servers

our engineers look after the server for you, from $135 a month.

Was this answer helpful?

Still stuck? Open a ticket