Technology

How to Install scrcpy(targ.gz) on any linux?

How to Install scrcpy(targ.gz) on any linux?
zlaam

zlaam

August 19, 2026·2 views

scrcpy is a useful tool for controlling and mirroring an Android device from a Linux computer. While most Linux distributions provide scrcpy through their package managers, those packages can sometimes be outdated.

This guide shows how to install the official prebuilt Linux release of scrcpy manually. It works across Linux distributions because we are using the binaries provided by the scrcpy project rather than distribution-specific packages.

We will also create a proper .desktop entry so that scrcpy appears in your application menu like a normal Linux application.

What We Will Do

The process is straightforward:

  1. Download the Linux release of scrcpy.
  2. Extract the archive.
  3. Move it to /opt.
  4. Create system-wide commands for scrcpy and adb.
  5. Create a .desktop application entry.
  6. Launch scrcpy from your application menu.
  7. Connect your Android device.

1. Download scrcpy

The official releases are available on the scrcpy GitHub repository:

scrcpy Releases on GitHub

Open the releases page and download the Linux archive that matches your system.

For a typical 64-bit Intel/AMD Linux computer, you will want the Linux x86_64 release.

For example:

scrcpy-linux-x86_64-v4.1.tar.gz

The version number may be different when you read this guide. Always use the latest suitable release available on the official releases page.


2. Extract the Archive

Assuming the downloaded file is in your Downloads directory, open a terminal:

cd ~/Downloads

Extract the archive:

tar -xzf scrcpy-linux-x86_64-v4.1.tar.gz

Replace the filename with the version you downloaded.

You should now have a directory similar to:

scrcpy-linux-x86_64-v4.1

Enter the directory:

cd scrcpy-linux-x86_64-v4.1

3. Check the Extracted Files

Run:

ls -la

You should see files similar to:

adb
disconnected.png
LICENSE
scrcpy
scrcpy.1
scrcpy.png
scrcpy-server

The important files are:

File Purpose
scrcpy Main scrcpy executable
adb Android Debug Bridge executable
scrcpy-server Server component used on the Android device
scrcpy.png Application icon
scrcpy.1 Manual page
disconnected.png Image used by scrcpy

One important advantage of the official Linux archive is that it already contains both scrcpy and its required adb binary.

You don't need to install another version of scrcpy through apt, dnf, pacman, or another package manager.


4. Test scrcpy Before Installing It System-Wide

Before moving anything, test the downloaded binary.

From inside the extracted directory:

./scrcpy

If your Android phone is connected and USB debugging is enabled, scrcpy should start.

If no device is connected, you may see a message indicating that no Android device was found. That is fine at this stage.

You can also check whether ADB detects your phone:

./adb devices

You should see something similar to:

List of devices attached
XXXXXXXXXXXX    device

If your device shows:

XXXXXXXXXXXX    unauthorized

look at your Android phone. Android should display an Allow USB debugging? dialog.

Accept it and run:

./adb devices

again.


5. Install scrcpy in /opt

Now let's install the extracted release in a standard location.

/opt is commonly used on Linux for manually installed third-party applications.

Go back to the Downloads directory:

cd ~/Downloads

Move the entire scrcpy directory to /opt:

sudo mv scrcpy-linux-x86_64-v4.1 /opt/scrcpy

The directory is now:

/opt/scrcpy

Check it:

ls -la /opt/scrcpy

You should still see:

adb
disconnected.png
LICENSE
scrcpy
scrcpy.1
scrcpy.png
scrcpy-server

6. Make scrcpy Available From the Terminal

At the moment, you could run scrcpy using:

/opt/scrcpy/scrcpy

But that's inconvenient.

We want this to work from anywhere:

scrcpy

Create a symbolic link:

sudo ln -s /opt/scrcpy/scrcpy /usr/local/bin/scrcpy

Do the same for ADB:

sudo ln -s /opt/scrcpy/adb /usr/local/bin/adb

Now check:

which scrcpy

You should get:

/usr/local/bin/scrcpy

And:

which adb

should return:

/usr/local/bin/adb

You can now run:

scrcpy

from any directory.

You can also verify the installed version:

scrcpy --version

7. Create a Desktop Entry

The next step is what makes the installation feel like a normal Linux application.

We will create a .desktop file so scrcpy appears in your desktop environment's application launcher.

Create the file:

sudo nano /usr/share/applications/scrcpy.desktop

Paste the following:

[Desktop Entry]
Version=1.0
Type=Application
Name=scrcpy
Comment=Display and control Android devices
Exec=/usr/local/bin/scrcpy
Icon=/opt/scrcpy/scrcpy.png
Terminal=false
Categories=Utility;
StartupNotify=true

Save the file.

If you are using Nano:

Ctrl + O
Enter
Ctrl + X

8. Understanding the .desktop File

The important parts of the file are:

Name=scrcpy

This is the name shown in your application menu.

Exec=/usr/local/bin/scrcpy

This tells Linux which executable should be launched.

Because we created the symbolic link earlier, we don't have to expose the /opt/scrcpy directory here.

Icon=/opt/scrcpy/scrcpy.png

This uses the icon included in the official scrcpy release.

Terminal=false

This tells the desktop environment not to open a terminal window when launching scrcpy.

Categories=Utility;

This tells Linux that scrcpy belongs to the utility category.


9. Update the Application Database

On most modern Linux desktop environments, the application should appear automatically.

If it doesn't appear immediately, update the desktop database:

sudo update-desktop-database /usr/share/applications

If the command is unavailable on your distribution, this step can generally be skipped.


10. Launch scrcpy From the Application Menu

Open your Linux application launcher and search for:

scrcpy

You should now see the scrcpy application with its icon.

Click it.

This launches:

/usr/local/bin/scrcpy

which ultimately points to:

/opt/scrcpy/scrcpy

11. Connect Your Android Phone

For USB connection, enable Developer Options and USB debugging on your Android device.

Connect the phone to your computer with a USB cable.

Check the connection:

adb devices

A working connection looks like:

List of devices attached
XXXXXXXXXXXX    device

Then simply run:

scrcpy

Your Android screen should appear in a desktop window.


12. Wireless Connection

Once ADB is working over USB, scrcpy can also be used with Android's wireless debugging capabilities.

For Android versions supporting wireless debugging, you can pair the device using:

adb pair IP_ADDRESS:PAIRING_PORT

For example:

adb pair 192.168.1.100:37099

Enter the pairing code displayed on your Android device.

Then connect to the device:

adb connect IP_ADDRESS:PORT

For example:

adb connect 192.168.1.100:5555

Check the connection:

adb devices

Once the device appears as device, launch:

scrcpy

13. Where Everything Is Installed

After completing this setup, the installation looks like this:

/opt/scrcpy/
├── adb
├── disconnected.png
├── LICENSE
├── scrcpy
├── scrcpy.1
├── scrcpy.png
└── scrcpy-server

The system-wide commands are:

/usr/local/bin/scrcpy -> /opt/scrcpy/scrcpy
/usr/local/bin/adb    -> /opt/scrcpy/adb

And the application launcher entry is:

/usr/share/applications/scrcpy.desktop

This gives you a clean separation:

  • /opt/scrcpy contains the actual scrcpy release.
  • /usr/local/bin contains convenient commands accessible from your shell.
  • /usr/share/applications contains the desktop application entry.

14. Updating scrcpy

One of the advantages of this method is that updating scrcpy is simple.

Download the newer Linux release from the official releases page, extract it, and replace /opt/scrcpy.

For example:

cd ~/Downloads
tar -xzf scrcpy-linux-x86_64-v4.2.tar.gz

Remove the old installation:

sudo rm -rf /opt/scrcpy

Move the new version into place:

sudo mv scrcpy-linux-x86_64-v4.2 /opt/scrcpy

The symbolic links do not need to be recreated because they still point to:

/opt/scrcpy/scrcpy

and:

/opt/scrcpy/adb

The desktop entry also does not need to be changed.


Conclusion

You don't need a distribution-specific package to install scrcpy on Linux.

The official Linux release already contains the main scrcpy executable, ADB, the scrcpy server, and the application icon. By placing the release in /opt, creating system-wide symlinks, and adding a .desktop file, you get a proper Linux installation that can be launched both from the terminal and from your desktop application's menu.

The final commands are essentially:

# Download and extract the official release first

sudo mv scrcpy-linux-x86_64-v4.1 /opt/scrcpy

sudo ln -s /opt/scrcpy/scrcpy /usr/local/bin/scrcpy
sudo ln -s /opt/scrcpy/adb /usr/local/bin/adb

sudo nano /usr/share/applications/scrcpy.desktop

with the desktop entry:

[Desktop Entry]
Version=1.0
Type=Application
Name=scrcpy
Comment=Display and control Android devices
Exec=/usr/local/bin/scrcpy
Icon=/opt/scrcpy/scrcpy.png
Terminal=false
Categories=Utility;
StartupNotify=true

After that:

scrcpy

is enough to start the application.

zlaam

zlaam

Author

Comments (0)

You need to be logged in to post comments

No comments yet. Be the first to share your thoughts!