Intro to Shell - raisercostin/software-wiki GitHub Wiki

Shell Scripting

  • windows: (cmd, powershell, win10 bash) + toybox + cmder
  • linux: (bash, zsh) + toybox
  • osx:

Scripting languages - general os operations

Terminal

Linux on Windows

summary

systems

  • minGW - MinGW (Minimalist GNU for Windows), formerly mingw32, is a free and open source software development environment to create Microsoft Windows applications. The development of the original MinGW project was halted in 2013, but an alternative called MinGW-w64 has been created by a different author to include several new APIs and provide 64-bit support.
  • msys - MSYS is a collection of GNU utilities such as bash, make, gawk and grep to allow building of applications and programs which depend on traditionally UNIX tools to be present. It is intended to supplement MinGW and the deficiencies of the cmd shell. A common misunderstanding is MSYS is "UNIX on Windows", MSYS by itself does not contain a compiler or a C library, therefore does not give the ability to magically port UNIX programs over to Windows nor does it provide any UNIX specific functionality like case-sensitive filenames. Users looking for such functionality should look to Cygwin or Microsoft's Interix instead.
  • msys2
  • gow - Gow (Gnu On Windows) is the lightweight alternative to Cygwin. It uses a convenient Windows installer that installs about 130 extremely useful open source UNIX applications compiled as native win32 binaries. It is designed to be as small as possible, about 10 MB, as opposed to Cygwin which can run well over 100 MB depending upon options.
  • msysgit
  • git-for-windows - Git for Windows focuses on offering a lightweight, native set of tools that bring the full feature set of the Git SCM to Windows while providing appropriate user interfaces for experienced Git users and novices alike. Git for Windows provides a BASH emulation used to run Git from the command line. *NIX users should feel right at home, as the BASH emulation behaves just like the "git" command in LINUX and UNIX environments.
  • cygwin

compare

Useful commands & utilities

Command Line Standard Executables

Environment concepts

Environment variables

  • Read first
  • Many programs use a so called HOME variable, like:
    • JAVA_HOME for JDK (JRE is not good because you will not have access to the compiler: javac)
    • M2_HOME for Maven
  • The format of a HOME variable: MY_HOME=InstallDir example
    • windows JAVA_HOME=C:\Program Files\Java\jdk1.8.0_131
    • linux JAVA_HOME=/usr/local/jdk1.8.0_131
  • To use binaries from those homes, add them to the special PATH variable. The binaries are usually in a bin directory
    • windows set PATH=%JAVA_HOME%\bin;%PATH%
    • linux/osx export PATH=$JAVA_HOME/bin:$PATH
  • Variables changes DO NOT propagate for running programs, so they should be restarted. This is by design.

Others

⚠️ **GitHub.com Fallback** ⚠️