webOS homebrew
~/webos-entware-installer

A real Linux
toolbox, on your TV.

One POSIX shell file sets up Entware on rooted LG webOS TVs, so you can install hundreds of command line packages with opkg. It checks your TV first, picks the right build, survives reboots and uninstalls cleanly.

webOS 23 · 24 · 25 arch aarch64 · armv7 deps none ★ 3 license MIT
root@lgtv: ~ · bash
features

Careful by default.

Built so a TV you love never ends up half-installed.

✓

Checks before it touches

Root, model, webOS version, kernel, Homebrew Channel, free space and the Entware server, all before anything changes.

64

Picks the right build

Recommends 64-bit aarch64 or 32-bit armv7 from your kernel, explains why, and test-runs it. If 64-bit can't run, it falls back.

↺

Never half-installed

A fresh install that fails partway undoes everything. A failed repair keeps your packages.

⏻

Survives reboots

A Homebrew Channel boot script remounts /opt and starts services, with a backup remount at SSH login.

✚

doctor

Shows what's installed and says exactly what to fix. Ends with "Everything looks right."

$_

A shell worth living in

Optional bash with nano, colors, a neon prompt and handy aliases, plus a safe fallback to the stock shell if bash ever breaks. Your own .profile and .bashrc are backed up and restored.

📺

webOS helpers

toast, launch, close, apps, applog and tvshot talk to the TV through luna-send, with Tab completion for app IDs.

install

SSH in. Paste. Done.

Needs a rooted TV with the Homebrew Channel, SSH turned on (keep telnet on too as a way back in), an internet connection and about 50 MB free.

$ wget -O /tmp/webos-entware-installer.sh https://raw.githubusercontent.com/ohmybahgosh/WEBOS-ENTWARE-INSTALLER/main/webos-entware-installer.sh
$ sh /tmp/webos-entware-installer.sh

Pick 1) Install or repair Entware, confirm the recommended build, then disconnect and SSH in again for bash.

ent

opkg, with manners.

ent is a separate helper for searching, installing and checking packages, with Tab completion for package names. It also does the webOS setup some packages need: nano colors, HTTPS certificates and a working locate. Plain opkg is never replaced.

$ ent search htop
$ ent install htop
$ ent owns /opt/bin/nano
$ ent du 10
$ ent upgrade
helperwhat it does
toast "msg"Notification on the TV screen
launch netflixStart an app, with optional params
apps -aList apps and IDs, running ones marked
applogFollow the system log, filtered by app
tvshotScreenshot the screen, prints the scp command
helpmeList every shortcut
myip · dfh · upNetwork, disk space, uptime
diff /

Exactly what it changes.

Nothing else on the system is touched, and webos-entware uninstall takes all of it back out.

pathwhat
/mnt/lg/user/optEntware, all packages, and the ent and webos-entware commands
/optBind mount of the folder above
/var/lib/webosbrew/init.d/S99entwareBoot script: remounts /opt, starts Entware services
~/.profileSwitches SSH logins to bash, backup remount (skipped with --no-shell)
~/.bashrcAliases and prompt. Your edits survive a repair
faq

Questions.

Why 32-bit or 64-bit?
Every LG TV runs a 32-bit system, but Entware brings its own libraries, so only the kernel matters. A 64-bit kernel runs the faster aarch64 build (one owner measured about 19% on a G4). A 32-bit kernel needs armv7.
Where does it download from?
Only Entware's official server, using the same files as Entware's own generic.sh installer.
SSH closes right after login?
Get a plain shell with ssh -t root@TV_IP sh or telnet, run rm /home/root/.profile, then webos-entware install to repair.
How is it tested?
The test suite runs install, repair, reboots and uninstall inside a private mount namespace with fake wget and opkg, under busybox sh, dash and bash.
need a hand?

Stuck, found a bug, or got an idea?

Pick a template and it fills in the right GitHub form for you. For anything private, email me.