Bash commands

1. Some handy bash commands


Compare two files and get list of differences.

$ diff file1 file2

Create softlink ln -s {/path/to/file-name} {link-name}

Delete softlink rm {link-name}

Support colors in cygwin bash terminal

Open  file “.bashrc” in your home folder and uncomment commands aliases with some additional parameters as “–color”:

alias grep=‘grep –color’ # show differences in colour alias egrep=‘egrep –color=auto’ # show differences in colour alias fgrep=‘fgrep –color=auto’ # show differences in colour

Some shortcuts for different directory listings

alias ls=‘ls -hF –color=tty’ # classify files in colour alias dir=‘ls –color=auto –format=vertical’ alias vdir=‘ls –color=auto –format=long’ alias ll=‘ls -l’ # long list alias la=‘ls -A’ # all but . and .. alias l=‘ls -CF’ #


You can ssh into machine with command:

ssh -l username -p port hostname ssh username@hostname -p port

ssh ibus@localhost -p 3022


2. Add bash.exe as terminal in Visual Studio Code

Open user settings profile and add command:

“”: “C:\\cygwin64\\bin\\bash.exe”

The terminal is opened inside IDE as “Terminal window” with current project folder.



3. Add bash.exe as terminal in IntelliJ IDEA IDE

Open “File/Settings/Terminal” and enter shell path in application settings section :


When you open terminal you get bash shell inside IDE :