◆Smart Home Ideas Journal

Mastering Plex on Linux: Terminal Commands for Power Users

By

Ever wished to stream your favorite movies and TV shows from your Linux machine to devices in your home network? Plex Media Server, a powerhouse in the home media universe, offers a seamless solution - and setting it up via the Linux terminal isn't as daunting as you might think.

Plex Media Server for Linux allows you to centralize and share your entire media collection - movies, music, photos, and more. Even better, it offers a gorgeous interface, powerful features, and the ability to access your content remotely. Let's dive into the world of Plex on Linux, guiding you through installation and basic command-line usage.

Installing Plex Media Server on Linux

The first step in your Plex journey is installation. Plex provides official packages for popular Linux distributions such as Ubuntu, Debian, CentOS, and Arch Linux.

How to Install Plex Media Server on Linux: A Tutorial for Newbie
How to Install Plex Media Server on Linux: A Tutorial for Newbie
I ditched my Plex subscription for this self-hosted media server and never looked back
I ditched my Plex subscription for this self-hosted media server and never looked back
How to Set Up a Plex Server on MacOS - Make Tech Easier
How to Set Up a Plex Server on MacOS - Make Tech Easier

For Ubuntu/Debian users, installation is as simple as running a few commands in the terminal:

sudo apt update
sudo apt install plexmediaserver

Autostart Plex on Boot

To ensure Plex starts automatically when your system boots, use the following command:

Patrick Fromaget – Page 17
Patrick Fromaget – Page 17
The 8 Best Media Server Software Options for Linux
The 8 Best Media Server Software Options for Linux
Starting a Plex Media Server - Everything you need to know
Starting a Plex Media Server - Everything you need to know
sudo systemctl enable plexmediaserver

The service will be active and ready to go once your system restarts.

Accessing Plex Web Interface

Plex Media Server runs on port 32400 by default. To access the web interface, open a web browser and navigate to http://localhost:32400.

Configuring and Managing Plex via Command Line

While the Plex web interface is intuitive and feature-filled, sometimes you just want to tweak settings from the terminal. Plex provides the `plex` command-line client to help with this.

How To Install Plex Media Server
How To Install Plex Media Server
Terminal
Terminal
a flat screen tv sitting on top of a white table next to a lamp and chair
a flat screen tv sitting on top of a white table next to a lamp and chair
a book with the title plex a manual for your media, with style
a book with the title plex a manual for your media, with style
How to install the Plex Media Player on Ubuntu
How to install the Plex Media Player on Ubuntu
How to Turn Your Old Laptop Into a Plex Media Server
How to Turn Your Old Laptop Into a Plex Media Server

First, ensure the `plex-campaign` package is installed:

sudo apt install plex-campaign

Listing Plex Servers

To list available Plex servers (both local and remote), use:

plexserver -l

Managing Plex Users and Libraries

You can create or delete users and manage libraries using the `plex bax` and `plex library` commands. For example:

Tutorial: Mediencenter Plex auf Low-Cost-Hardware
Tutorial: Mediencenter Plex auf Low-Cost-Hardware
Getting Started With Plex Media Server on Raspberry Pi
Getting Started With Plex Media Server on Raspberry Pi
Running the Plex Media Server in a Docker Container
Running the Plex Media Server in a Docker Container
95 Best Linux Monitoring Tools for SysAdmin: An All-in-One List
95 Best Linux Monitoring Tools for SysAdmin: An All-in-One List
How To Build A 23TB Plex Server With Docker
How To Build A 23TB Plex Server With Docker
No Plex App, No Problem: Using Plex as a DLNA/UPnP Server
No Plex App, No Problem: Using Plex as a DLNA/UPnP Server
Otto Plasma KDE
Otto Plasma KDE
Docker - Setting Plex
Docker - Setting Plex
How-to: Setting up a Plex Environment - Engadget
How-to: Setting up a Plex Environment - Engadget
Precisa de um Media Center em casa? Experimente o PLEX
Precisa de um Media Center em casa? Experimente o PLEX
How To: Building a Media Server with Plex
How To: Building a Media Server with Plex
These Are the 8 Plex Plugins I Can't Live Without
These Are the 8 Plex Plugins I Can't Live Without
10 Best Home Servers for Plex Media Streaming (June 2026)
10 Best Home Servers for Plex Media Streaming (June 2026)
  • Create a new user: plex bax create username email
  • Delete a user: plex bax delete username
  • List Libraries: plex library list
  • Create a new library: plex library create name type

For more commands, check the official Plex CLI commands documentation.

Troubleshooting Common Issues

From time to time, you might encounter issues with Plex Media Server. Here are two common roadblocks and their solutions:

Video Not Playing

If videos aren't playing on your devices, ensure both your server and client have the latest Plex updates. Outdated software can sometimes cause playback issues.

Remote Access Not Working

For remote access to work, you'll need to enable and configure port forwarding on your router. Consult your router's documentation or visit Plex's port forwarding guide for help.

There you have it - a comprehensive guide to setting up and managing Plex Media Server on Linux via the terminal. Happy streaming!