awful.systems
  • Communities
  • Create Post
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
Ignacio to Linux@lemmy.ml • 2 years ago

The only cheat sheet you need

cheat.sh

message-square
19
fedilink
122
external-link

The only cheat sheet you need

cheat.sh

Ignacio to Linux@lemmy.ml • 2 years ago
message-square
19
fedilink
alert-triangle
You must log in or register to comment.
  • @QuazarOmega@lemy.lol
    link
    fedilink
    44•2 years ago

    TL;DR

    sudo rm -rf /* # can't have problems without a system
    
    • @fxt_ryknow@lemmy.world
      link
      fedilink
      8•2 years ago

      Copy. Paste. Enter.

    • @Goun@lemmy.ml
      link
      fedilink
      2•2 years ago

      System administrators hate this trick!

  • @penquin@lemmy.kde.social
    link
    fedilink
    23•2 years ago

    Ok, this is a very good cheat sheet

    • @stepanzak@iusearchlinux.fyi
      link
      fedilink
      8•2 years ago

      Thefuck is a cool program, but I stopped using it because it was slow.

    • nelson
      link
      fedilink
      4•2 years ago

      I haven’t had as much luck with that program as I’d like to. :(

    • @Cwilliams@beehaw.org
      link
      fedilink
      3•2 years ago

      My .bash_history using this program…

  • @Administrator@monyet.cc
    link
    fedilink
    8•
    edit-2
    2 years ago
    cheat() {
      curl cht.sh/$1
    }
    
    • @Pantherina@feddit.de
      link
      fedilink
      2•2 years ago

      Awesome!

  • Arthur BesseM
    link
    fedilink
    8•
    edit-2
    2 years ago

    sites like this are neat until you remember that curl’s willingness to write ansi escape codes to stdout when it is a tty (as this site relies on to format the output when the user agent is curl) is actually a security vulnerability.

    • @JetpackJackson@feddit.de
      link
      fedilink
      5•2 years ago

      Could you give me an ELI5 please

      • Arthur BesseM
        link
        fedilink
        1•
        edit-2
        2 years ago

        This post The Terminal Escapes: Engineering unexpected execution from command line interfaces has a summary of the longer paper in the first link.

        tldr: There are a variety of ways that attackers can cause you to execute execute arbitrary code when you echo their maliciously-crafted data to your terminal. Therefore, when you run curl without redirecting its output, or when you cat a file you’ve downloaded, you’re trusting the server (and also the network, when you don’t have https:// in the url) not to exploit you.

        • @JetpackJackson@feddit.de
          link
          fedilink
          2•2 years ago

          Ah ok that makes sense, thank you!

    • @tal@lemmy.today
      link
      fedilink
      3•2 years ago

      I’m more-inclined to blame a virtual terminal than the program writing the sequences if there’s an exploit there.

      • Arthur BesseM
        link
        fedilink
        2•2 years ago

        Of course the terminal emulators are ultimately to blame but when there are so many problems in so many of them, imo curl’s default behavior should be to filter its output when writing to a tty.

        • @kraniax@lemmy.wtf
          link
          fedilink
          1•2 years ago

          is there a curl argument that can be used to block this behavior?

          • Arthur BesseM
            link
            fedilink
            1•2 years ago

            You can redirect curl’s output to a file with the -o filename option (or with > filename for shell redirection). But in the case of sites like this which output ansi-escape-formatted data that isn’t very useful.

            Also, after saving unknown data to a file it’s common to look at it with less or perhaps xxd or strings or file … all of which have had their own CVEs in recent years 🤦

            Computer security is a fractal of bad news.

  • @stifle867@programming.dev
    link
    fedilink
    6•2 years ago

    Appears to be the same developer as wttr.in

  • @bionicjoey@lemmy.ca
    link
    fedilink
    4•2 years ago

    IIRC this site uses TLDR pages

  • @vettnerk@lemmy.ml
    link
    fedilink
    1•2 years ago

    deleted by creator

Linux@lemmy.ml

!linux@lemmy.ml

remote_follow_modal_title

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !linux@lemmy.ml

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

  • Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
  • No misinformation
  • No NSFW content
  • No hate speech, bigotry, etc

Related Communities

  • !opensource@lemmy.ml
  • !libre_culture@lemmy.ml
  • !technology@lemmy.ml
  • !libre_hardware@lemmy.ml

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

  • 908 users / day
  • 3.36K users / week
  • 7.76K users / month
  • 16.4K users / 6 months
  • 54.1K subscribers
  • 6.45K Posts
  • 152K Comments
  • Modlog
  • mods:
  • @AgreeableLandscape@lemmy.ml
  • @nooter692@lemmy.ml
  • @MarcellusDrum@lemmy.ml
  • Arthur Besse
  • Cyclohexane
  • @d3Xt3r@lemmy.nz
  • BE: 0.19.3
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org