this post was submitted on 13 Jun 2026
51 points (94.7% liked)

Linux

65746 readers
572 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 7 years ago
MODERATORS
 

I'm more of a casual/newbie Linux user and I want to know if a specific Brother model is compatible with it. For reference, it's the HL-L2465DW monochrome laser printer.

you are viewing a single comment's thread
view the rest of the comments
[–] steel_for_humans@piefed.social 1 points 13 hours ago (1 children)

As a Linux noob I like your oneliner but I agree with @solxix@pawb.social

A more approachable way to do that would be to use wget and then manually run apt install with the downloaded file. That's what I've been doing. :) Yours is "magic" ;)

[–] ejs@piefed.social 1 points 13 hours ago

Fair enough. Let me quickly go through the one-liner, command-by command

# Joined by `&&`, bash runs these commands in sequence (as if run individually in shell), but exits/stops execution early if any command fails (return nonzero)
TMP_DEB=$(mktemp --suffix=.deb) && curl -sSL "https://support.brother.com/g/b/downloadend.aspx?c=us&lang=en&prod=hll2465dw_us&os=128&dlid=dlf106036_000&flang=4&type3=10283" -o "$TMP_DEB" && sudo apt install -y "$TMP_DEB" && rm -f "$TMP_DEB"  

# Going command by command:

# First, we create a local variable in the shell, named `TMP_DEB`
# We assign the value to `$(...)`. This stores the string output (to stdout) of running the command `mktemp ...` to `TMP_DEB`
# `mktemp` creates a temporary file and prints its name, which uses the name template `tmp.XXXXXXXXXX`
# `--suffix=.deb` flag appends `.deb` to the name template
TMP_DEB=$(mktemp --suffix=.deb)

# At this point, we've created a temporary file, and saved the name to a variable in bash
# Next, we download the file using curl. `-s` makes output silent, `-S` shows errors in output, and `-L` follows redirects
# note the url doesn't end in `.deb`, implying that we will be redirected by the web server to the file path. without -`L` curl will download a page that stores the redirection response from the web server, not the .deb package
# `-o "$TMP_FILE"` forces curl to store the downloaded file to the tmp file we created
# note the quotes around the variable expansion. `$TMP_FILE` would also resolve the string stored in the variable, but we use quotes to avoid string globbing (google this)
curl -sSL "https://support.brother.com/..."

# Next, we install the package with apt
# note: we use the string stored in the variable `TMP_DEB`, the filepath to the temp file we created, and downloaded the deb package
# `-y` flag skips the confirmation question "install package [y/n]: `
sudo apt install -y "$TMP_DEB"

# Finally, to clean up we delete the tmp file
rm -f "$TMP_DEB"