cheat.sh icon indicating copy to clipboard operation
cheat.sh copied to clipboard

OS cheat sheets

Open chubin opened this issue 5 years ago • 4 comments
trafficstars

Create cheat sheets collection for different operating systems types and distributions, to cover the most important operating system related specific tasks, such as package management, user management, boot procedure management etc.

Consider bash4all (by @tpanj) integration, where some typical tasks are already covered.

Todo

  • [ ] list of typical OS specific tasks
  • [ ] list of operating system/distributions to be supported
  • [ ] first cheat sheet example

(the todo list is not yet finished)

chubin avatar May 02 '20 08:05 chubin

Great! Just created https://github.com/tpanj/bash4all/commit/ad6559605f7f91d3ec82f0db22a0644368fb7485 which displays packaging commands in matrix e.g.

# matrix for one OS
$ how-in BEOS
BASH4ALL |                  BEOS |           
---------+-----------------------+--------------------
       i |        pkgman install |            
       I |     pkgman install -y |            
      se |         pkgman search |            
       u |      pkgman uninstall |            
       U |   pkgman uninstall -y |            


# for two OSes for those who eager to learn (see the holes  because of uncompleted)
$ how-in BEOS DEBIAN
BASH4ALL |                  BEOS |                    DEBIAN
---------+-----------------------+----------------------------------------------------
       i |        pkgman install |      sudo apt-get install 
       I |     pkgman install -y |   sudo apt-get -y install 
       q |                       |                  apt show 
      Qf |                       |           apt-file search 
       S |                       |              sudo service 
      se |         pkgman search |                apt search 
       u |      pkgman uninstall |       sudo apt-get remove 
       U |   pkgman uninstall -y |    sudo apt-get -y remove 

Anyone have better idea?

tpanj avatar May 03 '20 16:05 tpanj

It looks very interesting. I like the output. The only suggestion I would make: if there are two or more columns, all columns should be specified explicitly

$ how-in BASH4ALL BEOS DEBIAN

It would make the command more flexible.

Operating systems that I suggest:

  • Linux Debian/Ubuntu
  • Linux Fedora/CentOS
  • Linux Arch
  • FreeBSD
  • NetBSD
  • OpenBSD
  • Windows / Cygwin
  • BEOS

Have I forgotten some important distribution/OS?

chubin avatar Oct 18 '20 21:10 chubin

It is done now more flexible and with auto-completions.

$ how-in ARCH BEOS BASH4ALL DEBIAN REDHAT
        ARCH |                BEOS | BASH4ALL |                  DEBIAN |              REDHAT 
-------------+---------------------+----------+-------------------------+---------------------
pacman -S |      pkgman install |        i |    sudo apt-get install |    sudo dnf install 
pacman -Syu |   pkgman install -y |        I | sudo apt-get -y install | sudo dnf install -y 
pacman -Qi |                     |        q |                apt show |            dnf info 
pacman -Fl |                     |       Qf |         apt-file search |        dnf provides 
            |                     |        S |            sudo service |        sudo service 
pacman -Ss |       pkgman search |       se |              apt search |            dnf info 
pacman -Rs |    pkgman uninstall |        u |     sudo apt-get remove |     sudo dnf remove 
pacman -Rys | pkgman uninstall -y |        U |  sudo apt-get -y remove |  sudo dnf remove -y 

I list of commands in expanded and I hope that some will found this useful. Still have some problems with Cygwin.. What about https://chocolatey.org or https://scoop.sh ?

tpanj avatar Oct 31 '20 11:10 tpanj

scoop seems to look very interesting and promising.

Another question: do you want to add some items for such questions like:

  • how to restart a service
  • how to stop a service
  • how to see the log of the service
  • how to add service to the boot process

?

chubin avatar Nov 05 '20 19:11 chubin