Showing posts with label Cygwin. Show all posts
Showing posts with label Cygwin. Show all posts

Tuesday, April 14, 2020

Initialization of BASH sessions under Cygwin

If you are using GNU-Linux terminals under Microsoft (MS) Windows via Cygwin (which you should because MS Windows terminals, both the simple command prompt and the PowerShell are simply much, much, much ... powerful than a GNU-Linux terminal/shell), for example, the standard BASH Cygwin terminal, keep in mind that when you open such terminal, by default a login shell session is started.

When a login shell session is started, the usual BASH initial configuration file .bashrc is not automatically run ("sourced").
In addition, by default, no such BASH configuration file (.bashrc) originally exists.

If you want to create one and to put in it commands and function calls which you need at every BASH session, you need either to manually source such file after the terminal has been opened (buhhhh! very dumb and boring!!) or you need to automatically source it. How to do that?

What is automatically sourced at startup is the file .bash_profile (if you have created such file, by default it does not exist as well).

Thus, create a .bash_profile in your home folder, create a .bashrc file in the same folder and add the following BASH conditional statement inside the .bash_profile file:

if [ -f ~/.bashrc ]; then
    source ~/.bashrc
fi


See here for more information.

Thursday, June 5, 2014

7-Zip unavailable for 64-bit Cygwin

7-Zip is one of the most used programs for compression/decompression of files and archives.
p7zip is the porting of 7-Zip for GNU-Linux/POSIX-based systems.
It is not yet available for the 64-bit version of Cygwin.
In this post by Michael Hirsch, there are the instructions for running the 64-bit version of 7-Zip from the Cygwin terminal, which is of fundamental importance if you want to use 7-Zip in scripts for batch backing up of data.

Friday, June 10, 2011

OpenSSH server on MS Windows 7 via Cygwin

I've been struggling in getting sshd work under Cygwin installed on MS Windows 7 (that I had unfortunately to get installed on my work laptop because that's the system used at my Institution).

Some important reference materials:

http://pigtail.net/LRP/printsrv/cygwin-sshd.html

http://www.kgx.net.nz/2010/03/cygwin-sshd-and-windows-7/

http://www.acooke.org/cute/CygwinSSHS0.html