when I want to run a file manager or firefox from terminal, how can I surpress output and run it in the background as quickly as possible?

My current approach (an example starting thunar file manager in background):

thunar ./hello.txt&

but sometimes messages still pop up in the terminal then …

  • Trigg@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    2 months ago

    thunar ./hello.txt >/dev/null 2>&1 &

    The >/dev/null sends stdout to nowhere while the 2>&1 send stderr to stdout

    • PlanterTreeOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      2 months ago

      Is this the fastest way? typing this out with every call is tideous. can one add an alias for this?