Fixing “Read‑Only File System” Error on Linux System: Causes & Complete Solutions

Fixing “Read‑Only File System” Error on Linux System: Causes & Complete Solutions

Fixing “Read‑Only File System” Error on Linux System: Causes & Complete Solutions

Sharwat Shafin July 15, 2025

If you have ever faced "read-only file system" error in Linux, you know how frustrating it can be. It can slow down your work or even cause system issues. This problem can happen for many reasons—sometimes it's just a simple setting, other times it could mean something more serious like file system damage. Before you can fix it, it's important to understand what's actually causing it.

In this blog, I'll explain why this happens, how to fix it step by step, and share some tips to help you avoid it in the future.

What Causes the Read-Only File System Issue?

Here I'll explain some of the most common reasons why your file system suddenly becomes read-only.


File-system errors or corruption:

One of the main reasons your Linux system might go into read-only mode is file system corruption. This can happen if your Linux VPS shuts down unexpectedly, if there's a hardware issue, or even because of a bug in the file system.

Hardware or storage I/O issues

On VPS setups, your hard disk might have some physical problems, which is a common reason why Ubuntu sets the file system to read-only. For example, if there are bad sectors on the disk, the system may switch to read-only mode to avoid causing more damage.

Misconfigured System File

Sometimes, the system settings file called /etc/fstab can be misconfigured. If it has certain options like errors=remount-ro, your system might automatically switch to read-only mode when it finds a problem. It's a built-in safety feature, but the wrong setup can cause unexpected issues.

Full disk space

A 100% full filesystem may mount as read-only to prevent further writes.

Critical System Crashes

If your system crashes or has a serious error (e.g., kernel panic), it can mess up the file system. When you reboot the VPS, Linux OS might set the file system to read-only to protect it from further damage.


How to Detect the Problem

Let's walk through several easy-to-use commands that help you confirm this and find out why it happened.

Check If Any Partition Is Mounted Read-Only:

Run this command to check if any file systems are in read-only mode:

Terminal
mount | grep ' ro,'

If you see output like this:

/dev/sda1 on / type ext4 (ro,errors=remount-ro)

Then your root (/) or another partition is definitely read-only.

Check If Root (/) Is Read-Only:

Run this command to check the mount options for your root file system:

Terminal
findmnt -no OPTIONS /

If it says:

rw,relatime

Then it's read-write. If it says:

ro,relatime

Then it's read-only — and that's the problem.

Check Disk Space:

Run this command to check disk space:

Terminal
df -h

If you see something like:

Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1        40G   39G   0G  100% /

If Use% is 100%, your disk is completely full — and that's a problem.

Look for Kernel Messages (Read-Only Trigger Logs):

Run this command to check system logs for read-only remount messages:

Terminal
dmesg | grep -i "read-only"

This command searches through the system logs to find any messages related to file systems being set to read-only.

Example output:

EXT4-fs error (device sda1): Remounting filesystem read-only

This output gives strong evidence that Linux detected an error and forced the filesystem into read-only mode for safety.

Check File System Errors in Kernel Logs

Run this command to check kernel messages related to your file system (like ext4):

Terminal
sudo dmesg | grep -i ext4

This will show recent system messages that mention the ext4 file system. Replace “ext4” with your file system type (e.g., xfs, btrfs)

Check Detailed System Logs in /var/log/:

Run this command to check for system-level errors in the logs:

Terminal
sudo cat /var/log/syslog | grep -i error

or:

Terminal
sudo less /var/log/syslog

These commands help you find background issues like service crashes, disk problems, or permission errors—things that might cause your file system to go read-only.

Step-by-Step Guide to Fix the Read-Only File System Issue

Running into a read-only file system error on your Linux server can be really frustrating, especially when you can't make any changes or save files. But don't worry — in most cases, this issue can be fixed with a few steps. In this section, I'll walk you through some simple ways to identify and solve the problem.

Step 1: Try Remounting the File System

Sometimes the system switches to read-only mode because of a temporary issue. You can try to remount the file system as read/write with this command:

Terminal
sudo mount -o remount,rw /

This tells the system to remount your root (/) file system with write access. If this works, it may have just been a minor glitch. But if it doesn't, continue to the next steps.

Step 2: Check and Repair the File System (fsck)

File system corruption is a common reason for this issue. To fix it, you'll need to run a file system check using the fsck command. But first, you must unmount the file system (if it's not your root directory):

Terminal
sudo umount /dev/sdX1
sudo fsck -y /dev/sdX1

Replace /dev/sdX1 with the correct disk/partition name.

If you're fixing the root (/) file system, you can do this from a Live CD/ISO or rescue mode:

Terminal
sudo fsck -yf /dev/sdX1

Once the scan and repair are complete, reboot your server:

Terminal
sudo reboot

Step 3: Check /etc/fstab for Errors

The /etc/fstab file tells your system how to mount drives during boot. If there's a wrong setting here, it might cause your system to mount the file system as read-only. View the file using:

Terminal
cat /etc/fstab

Look for a line like this:

UUID=xxxx / ext4 errors=remount-ro 0 1

To avoid the system switching to read-only every time there's an error, you can change it to:

UUID=xxxx / ext4 defaults 0 1

Be careful when editing this file. Only make changes if you're sure about the correct settings.

Step 4: Check Disk Space

If your server runs out of space, it can cause the system to go into read-only mode. Run the command below to check disk usage:

Terminal
df -h

If any partition is 100% full, try cleaning up some space. For example, to clean up log files:

Terminal
sudo du -h --max-depth=1 /var/log
sudo apt clean

Freeing up disk space might fix the issue.

Step 5: Look for I/O Errors or Hardware Issues

If none of the above steps work, there may be a hardware problem or disk I/O error. Run the following to check for any error messages:

Terminal
dmesg | grep -i 'error\|I/O\|remount'

You can also check the health of your disk (if supported) with:

Terminal
sudo smartctl -a /dev/sdX

Replace /dev/sdX with your actual disk name. You may need to install the smartmontools package first.


How to Prevent "Read-Only File System" Errors in the Future

Once you've fixed the issue, it's a good idea to take a few simple steps to prevent it from happening again. These are easy habits that can keep your Linux VPS healthy and running smoothly.

Keep Your System Updated

Make sure your system is always running the latest updates and patches. Updates fix bugs, security holes, and system errors — some of which can cause disk or file system issues.

To update Ubuntu/Debian:

Terminal
sudo apt update && sudo apt upgrade

For CentOS/AlmaLinux:

Terminal
sudo yum update

Always Shut Down/Reboot Properly

Avoid turning off your server the hard way (like pulling the plug or holding the power button). Sudden shutdowns can corrupt the file system.

Always shut down with:

Terminal
sudo shutdown -h now

Always reboot with:

Terminal
sudo reboot

Check Disk Health Regularly

You can catch small problems before they become big ones. Use tools like fsck (file system check) and smartctl (disk health) to check your system.

To run a full check:

Terminal
sudo fsck -Af

To check disk health (if supported):

Terminal
sudo smartctl -a /dev/sda
Note: Some VPS providers may not support smartctl — it's more useful on physical disks or dedicated servers.

Monitor Disk Space

Running out of space can sometimes cause Linux to remount the file system as read-only. So it's smart to check it now and then.

Check disk usage:

Terminal
df -h

Double-Check /etc/fstab

This is the file Linux uses to decide how to mount your disks. A small mistake here can cause problems at boot or force a read-only mount.

Make sure entries in /etc/fstab are correct and don't include unnecessary ro (read-only) flags unless needed.

Conclusion

The “Read-Only File System” error in Linux is common — but it doesn't have to be stressful. With the right commands and a few quick checks, you can fix it fast and keep your server stable.

If you're looking for a faster, more reliable Linux hosting experience, check out our Ryzen-powered Linux VPS plans — built for performance and peace of mind.

FAQ:

Will using fsck delete my data?

fsck is designed to fix errors, not delete data. However, if it finds severely corrupted files, it may move them to a lost+found folder. Always back up if possible before running it.

Why does this happen more on VPS servers?

Some VPS platforms use shared virtual disks, which may be more prone to performance spikes, I/O delays, or improper shutdowns — all of which can lead to read-only states. That’s why choosing a stable host matters.

👉 Looking for reliable VPS? Check out our Linux VPS plans with Ryzen power

Can I fix a read-only file system without rebooting?
Yes, temporarily. But this doesn’t solve the root problem — a reboot and full disk check are usually needed.

Related Posts

Command Not Found in Linux: Real Error Examples & How to Fix Them

Command Not Found in Linux: Real Error Examples & How to Fix Them

Command Not Found in Linux: Real Error Examples & How to Fix Them

Sharwat Shafin July 7, 2025

Linux is powerful, but if you're new to it, encountering a message like "command not found" can be frustrating. Whether you're using Ubuntu, CentOS, Debian, Arch, or any other distro, this is one of the most commonly searched and seen errors.

In this guide, I'll break down real-life examples of this error and show you exactly how to fix them across different distributions.

What Does "Command Not Found" Actually Mean?

  • The command is not installed.
  • The command is installed, but not in your PATH.
  • You made a typo in the command.

Most Common "Command Not Found" Errors & Fixes Across Distros

Here are some of the most commonly searched "command not found" errors users encounter:

  • bash: ifconfig: command not found
    # Ubuntu/Debian:
    sudo apt install net-tools
    # CentOS/RHEL:
    sudo yum install net-tools
    # Fedora:
    sudo dnf install net-tools
    # Arch Linux:
    sudo pacman -S net-tools
    # Alpine:
    sudo apk add net-tools
    # openSUSE:
    sudo zypper install net-tools
                
  • bash: pip: command not found
    # Ubuntu/Debian:
    sudo apt install python3-pip
    # CentOS/RHEL:
    sudo yum install python3-pip
    # Fedora:
    sudo dnf install python3-pip
    # Arch Linux:
    sudo pacman -S python-pip
    # Alpine:
    sudo apk add py3-pip
    # openSUSE:
    sudo zypper install python3-pip
                
  • bash: python: command not found
    # Ubuntu/Debian:
    sudo apt install python3
    # CentOS/RHEL:
    sudo yum install python3
    # Fedora:
    sudo dnf install python3
    # Arch Linux:
    sudo pacman -S python
    # Alpine:
    sudo apk add python3
    # openSUSE:
    sudo zypper install python3
                
  • bash: git: command not found
    # Ubuntu/Debian:
    sudo apt install git
    # CentOS/RHEL:
    sudo yum install git
    # Fedora:
    sudo dnf install git
    # Arch Linux:
    sudo pacman -S git
    # Alpine:
    sudo apk add git
    # openSUSE:
    sudo zypper install git
                
  • zsh: node: command not found
    # Recommended for all distros:
    curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
    nvm install node
                
  • bash: curl: command not found
    # Ubuntu/Debian:
    sudo apt install curl
    # CentOS/RHEL:
    sudo yum install curl
    # Fedora:
    sudo dnf install curl
    # Arch Linux:
    sudo pacman -S curl
    # Alpine:
    sudo apk add curl
    # openSUSE:
    sudo zypper install curl
                
  • bash: sudo: command not found
    (If you're logged in as root)
    # Ubuntu/Debian:
    apt install sudo
    # CentOS/RHEL:
    yum install sudo
    # Fedora:
    dnf install sudo
    # Arch Linux:
    pacman -S sudo
    # Alpine:
    apk add sudo
    # openSUSE:
    zypper install sudo
                

What If the Command Is Installed But Still Not Found?

You might need to add it to your PATH.

Check PATH:
echo $PATH

Example Fix:
export PATH=$PATH:/usr/local/bin

To make it permanent, add that line to your .bashrc or .zshrc file.

How to Find the Package That Provides a Command

  • Debian/Ubuntu:
    apt-cache search 
    apt-file search  # install via: sudo apt install apt-file
  • CentOS/Red Hat:
    yum provides "*/"
  • Fedora:
    dnf provides 
  • Arch Linux:
    pacman -F  # Needs updated file database
  • Alpine:
    apk search -v 
  • openSUSE:
    zypper search 

Bonus: Fixing Your Own Custom Scripts

If you're creating custom bash scripts:

  • Save them in a known location, e.g., ~/scripts
  • Add that location to your PATH:
    export PATH="$PATH:$HOME/scripts"

FAQ: Command Not Found in Linux

Why do I get 'command not found' even after installing a package?

It could be because the binary is not in your system’s PATH. Run echo $PATH to see your current PATH, and ensure it includes the directory where the binary is installed.

What's the difference between 'command not found' in bash vs zsh?

Functionally, it’s the same issue — the shell can’t locate the command. The error message just varies by shell (bash: vs zsh:).

How can I make a command available permanently?

Add the installation directory to your PATH via .bashrc, .zshrc, or profile files: export PATH=”$PATH:/custom/path/to/bin”

Can I use a universal method to install missing commands?

Yes, for some tools like Node.js or Python, using version managers like nvm, pyenv, or package managers

like snap or flatpak can help across multiple distros.

Should I worry if 'sudo' itself is not found?
Yes — if sudo is missing, you may need to switch to the root account using su and install it manually depending on your distro

Conclusion

"Command not found" is common—but very fixable. Start by checking if the package is installed, then inspect your PATH. Whether you're managing servers or just learning Linux, these tips will help you quickly resolve the issue.

For persistent issues or uncommon errors, check the exact error and search it—or refer to this guide!

Related Posts

bash: systemctl: command not found – How to Fix  This Common Linux Error

bash: systemctl: command not found – How to Fix This Common Linux Error

bash: systemctl: command not found – How to Fix This Common Linux Error

Sharwat Shafin June 30, 2025
If you’ve ever run into the error:

bash: systemctl: command not found…

while trying to manage a service in your Linux VPS or server, you’re not alone. This is one of the most commonly encountered Linux command-line errors, especially by users working with minimal server distributions or Docker containers.

In this article, we’ll explore why the systemctl command might be missing and provide step-by-step solutions for various Linux distributions including Ubuntu, Debian, CentOS, AlmaLinux, and Rocky Linux.

Why You See This Error

The error appears when your Linux system does not have systemd installed or when systemctl is not available in your $PATH.

Common causes include:

  • Using a minimal OS image (like Ubuntu minimal, Alpine Linux, or containers)
  • Running a Linux container without systemd
  • systemd not installed or not properly linked
  • Using a distribution that uses an alternative init system like SysVinit or OpenRC

What the Error Means

This message means your system either doesn't use systemd, lacks the systemctl utility, or it isn't in your shell's PATH.

Troubleshooting Steps

Here are some troubleshooting steps on how to install systemctl Linux and command not found issue:

Step 1: Verify if systemd is Installed

Run the following commands to check your init system:

ps -p 1 -o comm=

or

systemd --version

If it shows 'systemd', your system supports systemctl. If it's 'init', 'Upstart', or 'SysV', you may not be using systemd.

Step 2: Check Your PATH Environment Variable

If systemd is installed but the systemctl command isn’t found, check if your PATH environment variable includes the directory where systemctl resides:

echo $PATH

t should include /bin/, /usr/bin/, or /usr/local/bin/, as these directories typically contain systemctl. If not, add them to your PATH.

export PATH=$PATH:/usr/bin/

Step 3: Install or Reinstall systemd

If systemd is not installed and your distribution supports it, install it using your package manager. Here’s how to fix systemd not found on some of the major Linux distributions:

For Debian/Ubuntu:

sudo apt update

or

sudo apt install systemd-sysv

For CentOS/Fedora:


sudo yum install systemd

Minimal Environments & WSL

  • Minimal Docker or cloud images may lack systemd.
  • WSL1 doesn't support systemctl. Use WSL2 instead.

Alternatives if You Don't Use Systemd

If you're on older systems like CentOS 6, use:


sudo service  start

How Our VPS Can Help


FAQ

What if which systemctl returns nothing?

It’s likely not installed or not in your PATH.

Can I use service instead?

Yes, on non-systemd systems.

Why doesn’t WSL1 support systemctl?

WSL1 lacks a real init system. Upgrade to WSL2.

Common Questions About the “systemctl Not Found” Error

If you're using our "systemctl: command not found" error, here are other related problems and questions Linux users often search:

  • Fix systemctl not found Ubuntu 22.04 - This error usually happens when you're using a minimal install or WSL where systemd is missing.
  • Systemctl command missing CentOS - If you're on CentOS 6 or using a Docker container, systemd may not be present by default.
  • How to install systemctl on Linux - You can typically restore systemctl by installing systemd: sudo apt install systemd or yum install systemd.
  • Alternative to systemctl on Debian - Use service or init commands if systemd is not supported.
  • Systemctl not found error fix - Follow the full guide above to solve this issue across multiple Linux distributions.

If you're using our Linux Ryzen VPS or Xeon VPS, this error may appear on minimal images. Our team pre-installs systemd in standard OS templates to avoid this issue.

Related Posts

Custom AI Models vs. Pre-Trained ChatGPT: What’s Best for Your Business?

Custom AI Models vs. Pre-Trained ChatGPT: What’s Best for Your Business?

Custom AI Models vs. Pre-Trained ChatGPT: What’s Best for Your Business?

Md. Shariful Islam March 19, 2025
What’s Best for Your Business

In our day-to-day lives, we use AI models extensively—for research, email handling, knowledge sharing, content creation, and more. Among these, the most prominent leader in the AI market is ChatGPT, which has become an integral part of our daily activities. However, nowadays, content generated by ChatGPT can feel predictable or even monotonous.

But what if ChatGPT could write and think just like us? Imagine if its tone perfectly matched our style and preferences—that would be amazing, right?

Today, we’re going to Fine-tune AI model to respond exactly the way we want, making interactions more personalized and engaging. For that we will be using platform.openai.com.

Fine-tune AI Model


1. Go to and create an account.

OpenAI create account page

2. Once logged into your account, go to Dashboard

OpenAI dashboard view

3. Now click on Fine-tuning from the left side menu.

Fine-tuning option in OpenAI menu

4. From the right side, click Create

Create fine-tuning job button in OpenAI dashboard

5. Here you need to provide some information:

  • Method: Supervised
  • Base Model: Use the latest one (Recommended)
Fine-tuning setup options in OpenAI
Please note that the prices are different for the different base model. Here is the pricing table:

ModelInput Cost (/1M tokens)Cached Input Cost (/1M tokens)Output Cost (/1M tokens)
GPT-4.5$75.00$37.50$150.00
GPT-4o$2.50$1.25$10.00
GPT-4o mini$0.150$0.075$0.600

In this context, 1 token approximately equals 1 word, but some words may be split into multiple tokens. For example, in the sentence: "FireVPS is the best Windows RDP provider,"

There are 7 words, and it would typically count as 7 tokens, as each word is treated separately. However, in some cases, common phrases or complex words may be split differently based on the tokenizer.

If your training dataset contains 1 million tokens, the pricing mentioned above will be affected accordingly.

6. Next step is to upload the training data set. For that we need to create a new training data set in Jsonl (Json in single line). Let’s assume we wanted to train ChatGPT on FireVPS business and we want to create content. Here are step by step for process for creating data sets:

A. Collect all previous FireVPS post from social media like LinkedIn, Facebook, Twitter etc and Save it in the notepad. And we will mark this as #post. This should look like this:
FireVPS social media posts

B. Now, we need to create a PROMPTfor these posts. We can either write it ourselves or use ChatGPT for assistance. To do this effectively, we must reverse-engineer the process.
Creating a prompt for FireVPS posts

C. Your Notepad should look like this
Notepad example for training data

D. Like this we have to create 50-80 sets of #PROMPT and #POST. Once our data collection is ready now it is time to format this in Jsonl.

E. Open Visual Studio Code and Paste below format

{"messages":[{"role":"user","content":"#PROMPT"},{"role":"assistant","content":"#POST"}]}

F. Now replace the #PROMPT and #POST with the content. Your file should be look like this
Example format for training data

G. Now convert all 50-80 sets of data to this Json format and save the file as JSON Lines
Converting data to Jsonl format

H. Now your training Data Sets are ready to upload.

7. Now upload the training data set and leave all other fields as it is.

Uploading the training dataset

8. Now click on Create.

Congratulations! You have successfully fine-tuned your AI model. From now on, whenever you ask or request content, it will generate responses based on your dataset, matching your way of speaking and tone.

Clicking on Create to finalize the process

Create Brand Brief

We need another important piece of information: The Brand Brief.

So, what is a Brand Brief? It’s a document that ensures our fine-tuned AI model generates content aligned with our brand's policies, refund terms, target audience, objectives, and more.

By providing a clear Brand Brief, we can make sure the AI produces content that truly represents our brand. Below is a Brand Brief format to guide you.

  • Brand Name
  • Company Background
  • Product/Service Vision Statement
  • Product/Service Mission Statement
  • Key Themes & Topics
  • Objectives
  • Target Audience
  • Unique Value Proposition (UVP)
  • Dislike and Opponents
  • Associate product and services
  • Tone of Voice

This is a general format for a simple brand brief. Providing more accurate and detailed information will improve the content quality.

If you're finding it difficult to create one yourself, you can use ChatGPT for assistance. Simply provide your company information and ask it to generate a brand brief for you.

Now Test the System

1. Go to Playground
Go to Playground

2. Select your Fine-tune AI model in Model Section

3. In System message paste your Brand Brief

4. Click on Additional Message

5. In the User section give your prompt. Example: Based on the given Brand Brief, write content about "Why dedicated server is better than shared hosting"
Provide your prompt

6. Now press Enter. Content will be generated.


The content generated will fully meet your needs, drawing on both your fine-tuned AI model and Brand Brief. This ensures that every piece of content reflects your unique writing style, tone of voice, and adheres to your company's policies and objectives. With this approach, you'll receive personalized, high-quality content that resonates with your audience and maintains consistency across all communications.

3 Test the Fine-tune AI Model

Related Posts

How to fix WordPress Media error “The uploaded file could not be moved to wp-content/2025/11”

How to fix WordPress Media error “The uploaded file could not be moved to wp-content/2025/11”

How to fix WordPress Media error “The uploaded file could not be moved to wp-content/2025/11”

Symptoms:

After moving a WordPress website from one server to another or any security changes in server level may trigger the error. While uploading a file using WordPress Media the upload process failed and the error is “The uploaded file could not be moved to wp-content/2025/11”
WordPress Media Error

Possible Cause:

wp-content/uploads directory has become immutable.

Fix:

To fix the issue you have to make the uploads directory mutable. When a directory is marked as immutable then its content can not be changed even by the administrator. So first step is to check make the directory mutable recursively and check whether the upload problem is fixed or not.

How to make the directory mutable?

sudo chattr -R -i /home/my-domain/public_html/wp-content/uploads/2025/11
Please change the path according to your upload directory path.

Now check the WordPress Media upload function. It should work fine now.

If you are still having any issues or confusion, please feel free to knock us on Live Chat from our website. Our support team is always ready to help you.
FireVPS / Live Chat / Skype / support@firevps.net

Domain Registration

Need Domain Name?

85% Promo on Domain Names

Data Center

Dedicated RDP

Poland RDP 50% recurring discount!

Recent Post

How to Transfer Files to a Linux VPS using SSH?

How to Transfer Files to a Linux VPS using SSH?

How to Transfer Files to a Linux VPS using SSH?

While file transfer between windows systems is easy and straightforward, it is a little tricky when it comes to transferring files between a windows system and a Linux VPS. However, it can be done easily using SSH. In Windows, you can just copy/paste a file or folder to a different Windows VPS or PC.

We will show you how to transfer files from a windows system to a Linux VPS running Ubuntu OS. We will be using PuTTy, a popular SSH client to transfer the files.

Here are the steps you need to follow:

Transferring files between a local PC and Linux VPS:

Step 1: Download PuTTy and PuTTy SCP (pscp).

  • You need to download PuTTy, and PuTTY SCP (pscp) if you don’t have it in your system.
  • Ensure pscp.exe is in your system’s PATH or navigate to its directory using the command prompt.

Step 2: Transferring files using “pscp”.

    • Open Command Prompt. You can either search and open it or just use Windows key + R, then type cmd to open it.
    • Now navigate to the directory containing the “pscp.exe”. You can do that by running this command in the CMD.
      $ cd C:\Program Files\PuTTY

  • Use the following command to transfer the file to the Linux VPS

Command format:
$ pscp path\to\local\file username@VPS_IP:/path/to/remote/directory

To transfer C:\Users\YourUser\Documents\transfer.txt to /home/your_vps_user/ on the VPS, use this command:
$ pscp C:\Users\YourUser\Documents\transfer.txt
your_vps_user_name@VPS_IP:/home/your_vps_user/

If your VPS’s IP is: 184.164.81.56 and your files name is: transfer_test.txt and the VPS’s username is root, then the command will look like this:
$ pscp “C:\Users\farha\Documents\transfr\transfer_test.txt” root@184.164.81.56:/home/

If you want to move a folder to the linux VPS, then the command will look a bit different.

Command format:
pscp -r path\to\local\folder username@184.164.81.56:/path/to/remote/directory

If your folder’s name is “transfr”, then the actual command will look like this:
pscp -r “C:\Users\farha\Documents\transfr” root@184.164.81.56:/home/

Step 3: Verify if the file has been transferred successfully.

  • If you want to check if the file has been transferred, then open PuTTy and login to the VPS.
  • Then Navigate to the directory where you transferred it.
  • Go to the directory by using $ cd home
  • Then use this command: $ ls


If you want to remove the file, then use the “rm” command.

Step 4: Removing a file or directory if needed.

    • $ rm tranfer_test.txt
    • Then use this command: $ ls

      If you want to remove a directory, then use “rm -r” command
    • $ rm -r transfr
    • If you type $ ls again, you will no longer see the file or directory there.

This is how you can easily transfer files from your Windows VPS or PC to a Linux VPS via SSH.

Transferring files between two Linux VPS:

You can also transfer files from one Linux VPS to another Linux VPS. For that follow the instructions given below:

  • Open Command Prompt
  • Login to your Source VPS that contains your files, then type this command and hit enter:
    $ ssh root@source_vps_ip
  • Enter your VPS password. (You may be asked to type yes or y to confirm the connection before entering the password).
  • Determine which file you want to transfer and the location/directory of the file.
  • You can use the “scp” command to move files between a source VPS and a destination VPS.
  • General Command format:
    $ scp “/home/folder1/filename.ext” root@destination_ip:/home/folder2/filename.ext

Here “/home/folder1/filename.ext” is the location/directory of the file in the source VPS. This part is for the destination VPS “root@destination_ip:/home/folder2/filename.ext”.
Here root@destination_ip is the username@destination_ip, :”/home/folder2/filename.ext” is the destination directory to transfer the file/folder.

For Example, If the Destination VPS’s IP is: 170.205.52.101 and the username is “root”; and the file is in “home/transfr” directory in the Source VPS (184.164.81.56), then use the following command to transfer the file:
$ scp “/home/transfr/new_file.txt” root@170.205.52.101:/home/

If you check in this Destination VPS: 170.205.52.101 you will see the file there.

If you want to transfer the whole folder/directory, then just add “-r” after “scp”.
The command will look something like this:
$ scp -r “/home/transfr/” root@170.205.52.101:/home/

If you check again, you will see the folder there now.

You can transfer files from VPS (170.205.52.101) to VPS (184.164.81.56) too. Just change the IP and directory name accordingly.
$ scp “/file name” root@184.164.81.56:/home/
For folder/directory:
$ scp -r “/Folder or directory name/” root@184.164.81.56:/home/
This is how you can transfer files between two different Linux VPS easily.

FireVPS offers both Windows VPS/RDP and Linux VPS. Buy Windows VPS/RDP and Ryzen Linux VPS from FireVPS for your VPS hosting needs. If you are still having any issues or confusion, please feel free to knock us on Live Chat from our website. Our support team is always ready to help you.
FireVPS / Live Chat / Skype / support@firevps.net

Domain Registration

Need Domain Name?

85% Promo on Domain Names

Data Center

Dedicated RDP

Poland RDP 50% recurring discount!

Recent Post