Cygwin
Cygwin: 3:05 : https://www.cygwin.com
Helpful Packages
Cygwin Must Have Packages
- lynx, wget, curl, rsync
- python, python3
- bzip, tar
- bash-completion
- vim, vim-common
- tmux
- git
- diffutils
- make
- gcc-c, gcc-g++, gcc-fortran
- openssh
Select these packages during cygwin installation process. If you forget to install any of them when you install cygwin, you can use apg-cyg (See below). Or, restart cygwin installation and select the packages you want to install.
git-completion
cd /bin
curl https://github.com/git/git/raw/master/contrib/completion/git-completion.bash -OL
Source it to turn it on.
source git-completion.bash
Add this line to ~/.bashrc
source /bin/git-completion.bash
Save and quit
source ~/.bashrc
apt-cyg to install packages
Download apt-cyg
. It is used to install packages.
cd ~
lynx -source rawgit.com/transcode-open/apt-cyg/master/apt-cyg > apt-cyg
OR
curl rawgit.com/transcode-open/apt-cyg/master/apt-cyg -OL -k
After that, run this:
install apt-cyg /bin
How to use apt-cyg to install packages?
apt-cyg install nano
apt-cyg install zip
apt-cyg install unzip
File system
cd ..
until you see /cygdrive
ls
in /cygdrive
should show you c
and p
drives (and any other additional drives available in the computer)
Adding aliases for directories
Open bashrc file.
vim ~/.bashrc
Add the following lines to ~/.bashrc
alias desktop="cd C:/Users/huyle/Desktop"
We can use open
for file explorer. e.g. When you are in Desktop in cygwin, type open .
to open it in file explorer.
alias open='cygstart'
If we need to make changes to bashrc file and reload them:
alias reload='source ~/.bash_profile'
export PATH="${HOME}/bin:${PATH}"
After making these changes, source
the bashrc file using source ~/.bashrc
Tabs and Hotkeys
Cygwin does not have tabs. So, we have to use something else that supports tabs.
Use Console2 or any of your favorite terminal emulators.
Console2: https://sourceforge.net/projects/cons…
These will be helpful while configuring the terminal emulator to use Cygwin.
For icon, use this: “C:\cygwin64\Cygwin-Terminal.ico”
For shell, use this: “C:\cygwin64\bin\mintty.exe”
Integrate with Command Prompt
For 64 bit, add C:\Users\<username>\cygwin64\bin; to the end of the environment variables.