How to change port via config files or CLI in Linux?

I am tinkering with port forwarding on my Jellyfin server in Linux, and I think I accidentally typed or changed the wrong port in my Jellyfin dashboard, and I don’t know how to change the port back since I can’t access the web interface. I have tried finding the config files on Linux, but I have had no luck so far. And on the forums, all I seem to find is the location for the Windows config files. Any idea how to change the port in Linux either by navigating to the correct config files or using the CLI somehow?

You’ll want to stop the Jellyfin server and then find/modify the system.xml file. In that file you should find

<PublicPort>8096</PublicPort>
<PublicHttpsPort>8920</PublicHttpsPort>
<HttpServerPortNumber>8096</HttpServerPortNumber>
<HttpsPortNumber>8920</HttpsPortNumber>

that can be adjusted and should take effect when the server starts again