A golden oldie.

  • kboy101222@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    5
    ·
    16 days ago

    Okay honest question, what does the # actually do? Every time I try and use it (fedora 42), it just doesn’t run

    • NoFood4u@sopuli.xyz
      link
      fedilink
      arrow-up
      8
      ·
      16 days ago

      It’s just a convention. commands starting with $ are meant to be executed by a user. commands starting with # are meant to be executed by root.

    • aarch64@programming.dev
      link
      fedilink
      arrow-up
      4
      ·
      edit-2
      16 days ago

      # indicates a comment in shell scripts, it’s interpreted the same way on a command line. That’s why it’s doing nothing. In this case, the # isn’t part of the command though. It’s to indicate that it’s a root shell. You’d see $ for a regular not-root shell. It’s part of that bit of text with your username, hostname, and current directory (with most default shell configurations, look up the PS1 Bash variable) that comes before the command you’re typing.