facebook twitter hatena line email

「Windows/cygwin」の版間の差分

提供: 初心者エンジニアの簡易メモ
移動: 案内検索
(その他入れといたほうが良いコマンド(自分メモ)
(locateを使う方法)
行39: 行39:
 
  updatedb --localpaths='/c/'
 
  updatedb --localpaths='/c/'
 
  locate test
 
  locate test
 +
==apt-cyg==
 +
cygwinのパッケージ管理
 +
 +
git clone https://github.com/transcode-open/apt-cyg.git
 +
install apt-cyg /bin
 +
 +
実行例
 +
apt-cyg install nano
 +
 +
==vimに色を付ける
 +
apt-cyg install vim
 +
 +
vi ~/.vimrc
 +
syntax on
 +
 +
vi ~/.bash_profile
 +
alias vi=vim
 +
 +
source ~/.bash_profile
 +
 +
==openコマンドを使う==
 +
vi ~/.bash_profile
 +
alias open=cygstart
 +
source ~/.bash_profile

2017年12月6日 (水) 18:04時点における版

cygwinとは

windowsで使えるUNIX系OSコンソール

ダウンロード

http://cygwin.com/

インストール

  1. setup.exeをクリック
  2. ダウンロード先を指定

cドライブへ移動

cd /cygdrive/c/

vimを使う

  1. setup.exeを実行
  2. select packageにてEditors/vimを選択

vimで日本語を扱う

  1. vim ~/.vimrc として以下入力(なかったら作る
set encoding=japan
set fileencodings=utf-8,iso-2022-jp,sjis,euc-jp

shを日本語化

  1. vi ~/.bashrc (なかったら作る
export LANG="ja_JP.utf-8"
  1. source ~/.bashrc

cでcドライブへ移動

  1. vi ~/.bashrc
alias c="cd /cygdrive/c"
  1. source ~/.bashrc

その他入れといたほうが良いコマンド(自分メモ

  1. openssh
  2. git
  3. mosh

locateを使う方法

updatedb --localpaths='/c/'
locate test

apt-cyg

cygwinのパッケージ管理

git clone https://github.com/transcode-open/apt-cyg.git
install apt-cyg /bin

実行例

apt-cyg install nano

==vimに色を付ける

apt-cyg install vim

vi ~/.vimrc

syntax on

vi ~/.bash_profile

alias vi=vim

source ~/.bash_profile

openコマンドを使う

vi ~/.bash_profile

alias open=cygstart

source ~/.bash_profile