| ページ一覧 | ブログ | twitter |  書式 | 書式(表) |

MyMemoWiki

Cygwin

提供: MyMemoWiki
ナビゲーションに移動 検索に移動

Cygwin

Linux | シェルプログラミング |

Tips

パッケージ

dig

  • bind-utilsをインストールで利用可能

シェルスクリプトで、\r シンタックスエラー

  • 以下のようなエラーとなる場合、改行コードを LF にする
line 3: 期待してない token `$'do\r のあたりにシンタックスエラー

Cドライブへ移動

$ cd c:
hiroto@taisetsu /cygdrive/c
$ pwd
/cygdrive/c

プロンプトをRedhat系と同じように変える

  • /etc/bash.bashrc の PS1の行を以下に置き換え
PS1='[\u@\h \W]\$'

clear コマンドを使う

  • ncurses をインストール

SSH

  • ~/.ssh/config に接続情報を記述しておくとsshのログインパラメータを都度指定する必要がない
Host phraseit.info
        HostName        phraseit.info
        IdentityFile    ~/.ssh/xxxxxx.pem
        User            ec2-user
Host typea.info
        HostName        typea.info
        User            root
        Port            3843

Cygwinでconfigファイルを利用するには以下の手順が必要

$ chgrp Users config
$ chmod 600 config

Cygwinで公開鍵を使う場合以下の手順が必要

chgrp Users ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa