11
submitted 18 hours ago by tdTrX@lemmy.ml to c/linux@lemmy.ml
you are viewing a single comment's thread
view the rest of the comments
[-] felsiq@piefed.zip 9 points 17 hours ago

I’m not familiar with the -p flag on Firefox but in general, adding & to the end of your command backgrounds it and disown detaches it from your shell so it doesn’t close.

firefox -p &; disown should do what you’re looking for, if I’m understanding you right

[-] non_burglar@lemmy.world 5 points 15 hours ago

You don't need disown if you're closing the terminal. Just

firefox -p &
[-] HubertManne@piefed.social 2 points 16 hours ago

I swear I have done these kindsof things without having an option that was a word. maybe just & im not sure. I just recall doing it and never recall using disown.

[-] tdTrX@lemmy.ml 1 points 16 hours ago

~$ firefox -p &; disown bash: syntax error near unexpected token `;'

[-] eager_eagle@lemmy.world 6 points 14 hours ago

just omit the ;

firefox -p & disown

[-] felsiq@piefed.zip 3 points 15 hours ago

Looks like I’ve gotten too spoiled with zsh, I guess that doesn’t work with bash. Doing it in two separate commands should work tho, ie firefox -p & and then disown

[-] CorrenteAlternata@lemmy.blahaj.zone 3 points 14 hours ago* (last edited 12 hours ago)

~~it should be enough to put a space between & and ; like this: firefox -p & ; disown but I'm not 100% sure.~~

I'm also very spoiled by zsh, and I also remember encountering this issue.

[-] felsiq@piefed.zip 1 points 12 hours ago

I actually started up bash to test this when op first responded, and the space had the same problem

[-] CorrenteAlternata@lemmy.blahaj.zone 2 points 12 hours ago* (last edited 12 hours ago)

Thanks for the correction.

I read the bash documentation and I think you simply don't need the ;. The & is already a command separator, just like ;

Tested with bash: sleep 100 & echo test prints right away.

https://www.gnu.org/software/bash/manual/bash.html#Lists

[-] Liketearsinrain@lemmy.ml 1 points 14 hours ago

You can just do firefox & disown

this post was submitted on 18 Mar 2026
11 points (100.0% liked)

Linux

63789 readers
1199 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 6 years ago
MODERATORS