This file is intended to be checked out into your HOME directory. Typically that is not empty
so a simple git clone
will not work. The following sequence is best way forward:
- git init
- git remote add origin REPO
- git fetch; git checkout master
- git submodule update --init --recursive
Cygwin 'git' may complain about some of the submodules so add ignore = all
to .gitmodules as needed.
Dropbox and environment-specific hooks (eg. Windows/Cygwin) can be helpful.
Use mklink
on certain shared paths to exure maximum compatability.
While within Cygwin /home
is intuitive, but feeding a path element to CMD.exe
(without calling cygpath [-w|m]
which always fully qualifies) needs a symlink to avoid silly errors.
#/etc/fstab
C:/Users /home none binary 0 0
let Windows tools understand /cygdrive/ via CMD.exe
mklink /D home C:\Users
mkdir C:\cygdrive; cd C:\cygdrive
mklink /D c C:\
ln -s /mnt/c/Users/$USER .USERPROFILE
ln -s .USERPROFILE/Dropbox
Git-Bash (MINGW) doesn't support symlinks at all!
While it's tempting to not set CYGWIN and leverage the new WSL-compatible reparse-points, Win10+ doesn't
properly render or follow them be it binaries (eg. AWS CLI) or Explorer. A function ln()
is defined
to invoke mklink
instead.
Deprecated:
Launch gpedit.msc
and navigate to
Computer Configuration -> Windows Settings -> Security Settings -> Local Policies -> User Rights Assignment
# .bashrc_os.cygwin|msys
CYGWIN|MSYS='winsymlinks:nativestrict'
Reload SHELL before proceeding! Then just use ln -s
as normal since it's now a wrapper.
mklink /D home [C:]\Users
mklink /D .WPHOME Dropbox/Work_Projects/XXX
mklink .gitidentity .WPHOME/.gitidentity
mklink /D .aws .WPHOME/.aws
mklink /D .ssh .WPHOME/.ssh
mkdir -p "$LOCALAPPDATA/workspace"
mklink /D workspace AppData/Local/workspace" # WSL: .USERPROFILE/...
ln -st . .WPHOME/.*.local
GIT_PROMPT=1
shows current repo state. AWS_*
are automatically displayed.
- Bash Autocomplete
- Vim
- Python3, Pip3
- pip3 install [--user] wheel, yamllint, demjson3 (nee jsonlint)
- AWS Cli
- AMI tools
- Elastic Beanstalk CLI
Integration with Windows OS can be trickly and can have unfortunate side-effects like
preferring DOS/WIN commands over Linux. The mask
directives rationalize how directory
listings appear as WSL interprets NTFS security markings.
/etc/wsl.conf
[automount]
enabled=true
options="metadata,umask=027"
[interop]
enabled=false
appendWindowsPath=false
[boot]
command=chmod a+w,o+t /run;/etc/rc.local;/etc/init.d/<service>; ...
It takes >8 seconds after exiting all WSL instances for the daemon to reload. Use wsl --shutdown
to force the issue.