8

I want to use Cygwin as a replacement to cmd.exe on Windows. When I search my Windows PC for Cygwin, I see two Cygwin programs that I can use...

enter image description here

Cygwin Terminal runs C:\cygwin\bin\mintty.exe

Cygwin Bash Shell runs C:\Apps\cygwin\cygwin.bat (this bat file subsequently calls C:\Apps\cygwin\bin\bash.exe)

Both of them open up what seem like command windows that I can use. But which one should I use? Is there any difference between them?

2 Answers 2

6

The "Cygwin Terminal" one runs Mintty, a terminal emulator installed by default by Cygwin.

The other one just executes bash.exe from within another shell (a Windows Command Prompt, another Mintty instance, RXVT).

They both run the same Cygwin setup. It's simply a matter of preference as Mintty is more customizable than the default Windows Command Prompt.

Example:

Example Mintty

1
  • How has this changed now? I dont see any of these things/ options from the Question or the Answer.
    – Alex S
    Oct 28, 2019 at 10:16
-1

Tip: http://www.tldp.org has at least two documents on learning to use bash.

Find and install rxvt, I used cygwin extensively and ended up considering it be the best terminal in cygwin. "bash" is what you run in any of these.

rxvt simulates "xterm" which has been available "for ages" in the Linux world,
if you find the need to modify it in any way you may google on it and find a lot of tweaks that often do work.

cygwin.bat is for you to modify, launch rxvt from there.




The remainder is old stuff and may or may not be useful, if you decide that rxvt is "good to use".

This was the end of my old cygwin.bat - I leave it to you to ponder on WHY I launched and re-launched bash in this manner, uh there is a hint in there.

REM Making  .bash_profile and .Xdefaults  be used,
REM the chicken and egg problem!
bash -lc "run /bin/rxvt -ls -e /bin/bash -l "

Note: I have no idea if it works as intended any longer, nor if it makes any real difference.

To get rxvt nicely set, I used this...

$HOME/.XDefaults

# XTerm == rxvt as rxvt simulates xterm

rxvt.background:        black
rxvt.foreground:        grey
rxvt.visualBell:        true

rxvt.keysym.7e37:   ^A
rxvt.keysym.7e38:   ^E

rxvt.cutchars: "/`"'&()*,;?@[]{|}"
rxvt.meta8:     true
rxvt.backspacekey: ^H

# Don't juggle display when 'doing' output
rxvt.scrollTtyOutput:   false
rxvt.scrollWithBuffer: false
rxvt.scrollTtyKeypress: true

# Local preferences
rxvt.saveLines:     6000
rxvt.scrollBar_right:   true
rxvt.scrollColor:   #c5c0a5
Rxvt.scrollstyle:   rxvt


# Allow four columns of ls output
# ...nicely positioned on 1024x768 pixels
rxvt.geometry:      112x56+20+20
rxvt.font: "Lucida Console-12"
Rxvt.font1:                     "Lucida Console-10"
Rxvt.font2:                     "Lucida Console-13"
Rxvt.font:                      "Lucida Console-16"
Rxvt.font3:                     "Lucida Console-19"
Rxvt.font4:                     "Lucida Console-22"
Rxvt.font5:                     "Lucida Console-25"
Rxvt.font6:                     "Lucida Console-28"

# Peculiar char spacing
# rxvt.font: Verdana-13

... and also this:

$HOME/.inputrc

# base-files version 3.6-1

# To pick up the latest recommended .inputrc content,
# look in /etc/defaults/etc/skel/.inputrc

# Modifying /etc/skel/.inputrc directly will prevent
# setup from updating it.

# The copy in your home directory (~/.inputrc) is yours, please
# feel free to customise it to create a shell
# environment to your liking.  If you feel a change
# would be benifitial to all, please feel free to send
# a patch to the cygwin mailing list.

# the following line is actually
# equivalent to "\C-?": delete-char
"\e[3~": delete-char

# VT
"\e[1~": beginning-of-line
"\e[4~": end-of-line

# kvt
"\e[H": beginning-of-line
"\e[F": end-of-line

# rxvt and konsole (i.e. the KDE-app...)
"\e[7~": beginning-of-line
"\e[8~": end-of-line

# VT220
"\eOH": beginning-of-line
"\eOF": end-of-line

# Allow 8-bit input/output
#set meta-flag on
#set convert-meta off
#set input-meta on
#set output-meta on
#$if Bash
  # Don't ring bell on completion
  #set bell-style none
  # or, don't beep at me - show me
  #set bell-style visible
  # Filename completion/expansion
  #set completion-ignore-case on
  #set show-all-if-ambiguous on
  # Expand homedir name
  #set expand-tilde on
  # Append "/" to all dirnames
  #set mark-directories on
  #set mark-symlinked-directories on
  # Match all files
  #set match-hidden-files on
#$endif
7
  • This is a matter of preference, and completely fails to answer OP's question. Jul 23, 2014 at 20:51
  • Have you run cygwin? in mintty? the cmd-window like terminal? Knowing about rxvt and the recommendation to use it is hardly any strange stuff.
    – Hannu
    Jul 23, 2014 at 20:53
  • So you have run cygwin. But not in pure rxvt? ;-)
    – Hannu
    Jul 23, 2014 at 21:21
  • 1
    RXVT is unrelated to the question content as he's asking what difference (if any) there is between the two shortcuts. Jul 23, 2014 at 21:25
  • Sorry to disagree on that. You end up with a bash prompt - period. Which one of the terminals to use is up to the user, I added one extra option that I can warm-heartedly recommend, an option that you do not find easily as a new user.
    – Hannu
    Jul 23, 2014 at 21:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .