Skip to content

Instantly share code, notes, and snippets.

@mmngreco
Last active August 12, 2020 06:46
Show Gist options
  • Save mmngreco/826ba827c4fa6533c30bf4dba22111c4 to your computer and use it in GitHub Desktop.
Save mmngreco/826ba827c4fa6533c30bf4dba22111c4 to your computer and use it in GitHub Desktop.
[cygwin] installation windows #linux #windows

Download cygwin from http://www.cygwin.com/

Inside the folder where is the downloaded file:

./setup-x86_64.exe --no-admin

To install more packages:

./setup-x86_64.exe --no-admin -q -P wget -P gcc-g++ -P make -P diffutils -P libmpfr-devel -P libgmp-devel -P libmpc-devel -P lynx -P vim -P tmux -P xclip -P dos2unix -P zhs

or

Install a package manager, apt-cyg:

lynx -source rawgit.com/transcode-open/apt-cyg/master/apt-cyg > apt-cyg
install apt-cyg /bin

After that we can use it as follows:

apt-cyg install vim

source : https://github.com/transcode-open/apt-cyg

To launch

We can create a shortcut for this

C:\cygwin64\bin\mintty.exe -i /Cygwin-Terminal.ico -

source: cmderdev/cmder#453 (comment)

Change HOME folder

echo db_home: windows >> /etc/nsswitch.conf

source: https://stackoverflow.com/questions/1494658/how-can-i-change-my-cygwin-home-folder-after-installation?rq=1

If slow running

mkpasswd -l -c > /etc/passwd && echo 'passwd: files' > /etc/nsswitch.conf
mkgroup -l -c > /etc/group && echo 'group: files' >> /etc/nsswitch.conf 

or

getent passwd $(id -u) > /etc/passwd; getent group $(id -G) > /etc/group
echo passwd: files db > /etc/nsswitch.conf; echo group: files db >> /etc/nsswitch.conf

source: https://superuser.com/questions/877051/cygwin-from-windows-is-very-slow-laggy

Compile winpty

setup-cygwinx86 --no-admin -q -P mingw64-i686-gcc-g++ -P gcc-g++ -P make 

source : rprichard/winpty#64 (comment)

More

Documentation see http://www.cygwin.com/cygwin-ug-net/using.html

tmux + vim-slimux + ipython

code to fix https://github.com/epeli/slimux/pull/80/commits/e7307c334b76631729848533e5cae7d519a861ad

Links

  1. http://www.voxforge.org/home/docs/cygwin-cheat-sheet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment