「Cygwin」の版間の差分
ナビゲーションに移動
検索に移動
| (同じ利用者による、間の1版が非表示) | |||
| 1行目: | 1行目: | ||
| − | ==Cygwin== | + | ==[[Cygwin]]== |
[[Linux]] | [[シェルプログラミング]] | | [[Linux]] | [[シェルプログラミング]] | | ||
| − | ==Tips== | + | ==[[Tips]]== |
===パッケージ=== | ===パッケージ=== | ||
====dig==== | ====dig==== | ||
| 10行目: | 10行目: | ||
*以下のようなエラーとなる場合、改行コードを LF にする | *以下のようなエラーとなる場合、改行コードを LF にする | ||
line 3: 期待してない token `$'do\r'' のあたりにシンタックスエラー | line 3: 期待してない token `$'do\r'' のあたりにシンタックスエラー | ||
| + | ===Cドライブへ移動=== | ||
| + | <pre> | ||
| + | $ cd c: | ||
| + | hiroto@taisetsu /cygdrive/c | ||
| + | $ pwd | ||
| + | /cygdrive/c | ||
| + | </pre> | ||
| − | === | + | ===プロンプトを[[R]]edhat系と同じように変える=== |
*/etc/bash.bashrc の PS1の行を以下に置き換え | */etc/bash.bashrc の PS1の行を以下に置き換え | ||
PS1='[\u@\h \W]\$' | PS1='[\u@\h \W]\$' | ||
| 26行目: | 33行目: | ||
User root | User root | ||
Port 3843 | Port 3843 | ||
| − | ==== | + | ====[[Cygwin]]でconfigファイルを利用するには以下の手順が必要==== |
$ chgrp Users config | $ chgrp Users config | ||
$ chmod 600 config | $ chmod 600 config | ||
| − | ==== | + | ====[[Cygwin]]で公開鍵を使う場合以下の手順が必要==== |
chgrp Users ~/.ssh/id_rsa | chgrp Users ~/.ssh/id_rsa | ||
chmod 600 ~/.ssh/id_rsa | chmod 600 ~/.ssh/id_rsa | ||
2021年1月6日 (水) 12:15時点における最新版
目次
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
© 2006 矢木浩人