How to Manage Files and Folders in Linux (Commands and GUI Tools Explained)

Published On: October 3, 2025
Follow Us
How to Manage Files and Folders in Linux

One of the first things new Linux users need to learn is how to manage files and folders — the basic building blocks of your system. Whether you’re organizing documents or editing configuration files, mastering file management is essential.

In this guide, we’ll cover both command-line (Terminal) and graphical (GUI) methods, so you can choose what works best for you.


🧭 Understanding the Linux Filesystem Structure

Before diving into commands, here’s a quick overview of where things live in Linux:

DirectoryPurpose
/homeUser files and folders
/etcSystem configuration files
/varLog files and variable data
/usrInstalled applications and files
/tmpTemporary files

Your personal files live in /home/your-username/ — this is your Home directory.


📁 Managing Files and Folders Using GUI (File Manager)

All Linux desktop environments come with a file manager. Here are some common ones:

Desktop EnvironmentFile Manager
GNOME (Ubuntu)Files (Nautilus)
KDE PlasmaDolphin
XFCEThunar
Cinnamon (Linux Mint)Nemo

✅ Basic Actions You Can Perform:

  • Open folders
  • Create new files/folders (Right-click > New Document/Folder)
  • Rename (Right-click > Rename)
  • Copy/Paste (Right-click or Ctrl + C / Ctrl + V)
  • Move to Trash or Delete Permanently
  • Drag and drop between folders

📝 Tip: Enable “Show Hidden Files” by pressing Ctrl + H. Hidden files start with a . (dot), like .bashrc.


💻 Managing Files and Folders Using Terminal

Once you’re comfortable, using the terminal gives you faster and more powerful control over your files.

🔍 Navigation Commands

CommandDescription
pwdShow current directory
lsList files and folders
cd folderChange directory
cd ..Go up one level
cd ~Go to your home directory

📂 Creating Files and Folders

CommandDescription
touch file.txtCreate a new empty file
mkdir foldernameCreate a new folder
mkdir -p folder/subfolderCreate nested folders

📝 Viewing Files

CommandDescription
cat file.txtDisplay content of the file
less file.txtScroll through a file (press q to quit)
head file.txtShow first 10 lines
tail file.txtShow last 10 lines

✏️ Renaming and Moving Files

CommandDescription
mv oldname.txt newname.txtRename a file
mv file.txt /path/to/folder/Move a file to another folder
mv file.txt ~/Documents/Move to Documents folder

📋 Copying Files and Folders

CommandDescription
cp file.txt copy.txtCopy a file
cp file.txt /other/folder/Copy to another folder
cp -r folder1/ folder2/Copy folder and contents

🗑️ Deleting Files and Folders

CommandDescription
rm file.txtDelete a file
rm -i file.txtDelete with confirmation prompt
rm -r foldernameDelete folder and contents recursively
rm -rf foldernameForce delete folder (⚠️ Use with care!)

🛑 Warning: Files deleted using rm do not go to Trash — they are permanently removed.


🔍 Bonus: File Permissions and Ownership

To check file permissions:

ls -l

Example output:

-rw-r--r-- 1 user user 1024 Oct 3  file.txt

Explanation:

SymbolMeaning
-Regular file (d for folder)
rw-Owner can read/write
r--Group can read
r--Others can read

Change permissions:

chmod 755 script.sh

Change ownership:

sudo chown username:groupname file.txt

🧪 Practice Exercise for Beginners

Try this in your terminal:

cd ~
mkdir practice-folder
cd practice-folder
touch file1.txt
cp file1.txt file2.txt
mv file2.txt renamed.txt
rm file1.txt

This creates a folder, makes a file, copies it, renames it, and deletes the original.


📌 Quick Reference Table: File Commands

ActionCommand Example
Create filetouch file.txt
Create foldermkdir new_folder
Rename filemv old.txt new.txt
Move filemv file.txt ~/Documents/
Copy filecp file.txt copy.txt
Delete filerm file.txt
View file contentcat file.txt
Show hidden filesls -a

✅ Conclusion

Managing files and folders in Linux is simple once you understand the basics. The terminal offers powerful tools, while the GUI is intuitive and beginner-friendly. Over time, combining both approaches will make you a more confident Linux user.

sapan singh

👨‍💻 About Sapan Singh Hi, I’m Sapan Singh — a passionate software developer with a strong love for technology, gaming, and building useful digital tools.

Join WhatsApp

Join Now

Join Telegram

Join Now

Leave a Comment