Looking for a way to easily mirror your Android phone’s screen on your Linux desktop? I’ve found a tool that lets you do so. The best part? It’s free and there’s no string attached. It’s called scrcpy. Let’s explore it and see its potential in this guide.

What Is scrcpy?

scrcpy (pronounced “screen copy”) is a lightweight, open-source tool that allows you to mirror and control your Android device directly from your computer. It supports Windows, macOS, and Linux, but is especially popular among Linux users for its simplicity and versatility. scrcpy uses the Android Debug Bridge (ADB) to establish a connection between your Android device and your computer.

The tool makes use of Android’s screen-casting capabilities to encode your device’s screen into an H.264 video stream. This stream is sent to your computer via USB (or Wi-Fi for advanced setups). A cool thing is that scrcpy forwards keyboard and mouse inputs from your computer to your Android device, allowing you to interact with the mirrored screen seamlessly. Despite being lightweight, scrcpy is highly efficient, offering low latency, high frame rates, and support for 1920x1080 resolution or higher.

Installing scrcpy on Linux using the installation script.

Installing scrcpy on Linux

For demonstration, I’m usingUbuntu 24.04 LTS. However, I’ll share instructions for other Linux distros where applicable. First, you need to install scrcpy on Linux.

If you’re using Arch Linux or a derivative of Arch, install it from your package manager with this command:

Checking the version of scrcpy on Linux.

On Gentoo Linux, use:

If you’re using Debian, Ubuntu, or their derivatives, you may install it using snap:

Getting scrcpy on Debian/Ubuntu Without snap

If you don’t want to use snap on a Debian or Ubuntu-based system, be aware it’s not recommended to use the official APT package to install scrcpy because the package is too old. Instead, you can use the provided installation script. First, update your system:

Then, install these dependencies:

After that, clone their GitHub repo and run the installation script:

Once you’ve successfully installed it, check the version by running:

This confirms that our installation was successful. If you need to update scrcpy whenever there’s a new release, pull the content from the GitHub repository again and run the installation script:

Mirroring Android on Linux via USB

First, connect your Android phone to your Linux device witha USB cable. Make sure toenable USB debugging on Androidif you haven’t already.

If you’re running Linux on your bare device, your phone should connect to your desktop immediately. However, if you’re running a virtual machine, then you need to enable the device from the USB menu. On VirtualBox, go to Devices > USB. Tick the box for your phone name.

Connected Android devices listed using adb.

To confirm the connection, run thisadb commandin your terminal:

We’ve attached the device successfully. To mirror your Android screen on your Linux device, run:

You can use your mouse to control the Android phone. Click on an app to open it or scroll to change the window. The mouse right-click button works as the back button. The middle-click button acts as the home button. There are many otheruseful shortcutsthat allow you to have better control using your mouse and keyboard.

Mirroring Android screen on Linux using scrcpy via USB.

If you have multiple devices connected to your Linux device at the same time, you can specify which one to mirror in four ways:

  1. Passing the phone’s serial number as an argument. you’re able to find the serial number in the device settings.

Using adb to enable wireless debugging on your Android phone.

  1. Mirroring the phone connected via USB (works when there’s only one device connected via cable)

  2. Mirroring the phone connected over TCP/IP (works when there’s only one device connected in this method)

Finding your phone’s IP address from Settings.

  1. Passing the phone’s IP address as an argument if it’s listening on TCP/IP

Wirelessly Mirroring Android on Linux

If you don’t want to get intocable troubles, you can also set up scrcpy to mirror your Android phone’s screen wirelessly. For this, both devices need to be on the same Wi-Fi network. First, connect your phone to the Linux desktop via a USB cable. Make sure it’s recognized by adb:

Then enable wireless debugging on your phone by running this command:

Connecting Linux device to Android phone wirelessly using adb.

Now disconnect the phone from the USB cable.Find the IP addressof your phone. You can find it in the phone Settings or Wi-Fi settings. I’m using a Samsung device, so in my case, I had to go to Settings > About Phone > Status information to find the IP address.

Once you find the IP address, run this command in the terminal:

Mirroring Android phone’s camera on Linux using scrcpy.

If all seems well, run scrcpy to mirror the Android screen wirelessly:

You should see your phone’s screen on your desktop even though it’s not connected via USB. Depending on your internet connection, you may notice a performance drop or more latency in the wireless connection than the wire connection. I personally prefer wireless mirroring since I don’t have to deal with cables.

Running VLC in a virtual display via scrcpy.

Here’s What Else You Can Do With scrcpy

scrcpy is much more than just anAndroid screen mirroringtool. You can record your Android screen, use the phone camera, play audio on the desktop, and control how you can interact with your Android phone via scrcpy. Let’s quickly go through some features you might find interesting.

you’re able to change some of the settings of the video stream that you’re forwarding from your Android phone, such as screen size, bit rate, codec, and frame rate.

If you want to mirror your phone’s camera instead of the screen, run:

As for audio, if you’re mirroring the display, by default, your phone’s output audio will be played on the desktop. If you’re mirroring the camera, then your phone’s microphone audio will be played on the desktop. You can choose which audio source to use or disable it completely.

If you want to record the video and audio being mirrored, run:

Another feature that grabbed my attention is the virtual display. Basically, you can create more displays and mirror them on the desktop, not necessarily mirroring your phone screen. For example, you can have one display mirroring the phone screen while another display, a virtual display, shows an app. If, for example, you’d like to run VLC in a virtual display, run:

Likewise, you can start as many new virtual displays as you wish.

There are many screen mirroring tools available for Android. However, scrcpy being free and open-source and containing many powerful features make it a top contender. If you want to learn more about this tool, runman scrcpyon your terminal or visit theofficial documentation.