Skip to content

Instantly share code, notes, and snippets.

@cromat
Last active October 17, 2018 12:52
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cromat/50a19a284315e8eb4f56331bdc1eea6c to your computer and use it in GitHub Desktop.
Save cromat/50a19a284315e8eb4f56331bdc1eea6c to your computer and use it in GitHub Desktop.
Windows productive tools - Linux alternatives
# These are handy tools for Windows and to make it more Linux-like. Tools tested and used on Windows 7
# Python version 3.6 is installed in process
cygwin - https://cygwin.com/install.html (need to add vim, wget, curl, lynx, procps-ng, python3-pip, python-setuptools in installation)
in cygwin bash run:
easy_install-3.6 pip
pip install virtualenv
Download and install python for windows - https://www.python.org/downloads/
Create symlink inside cygwin - ln -s /cygdrive/c/Users/Your_User/AppData/Local/Programs/Python/Python36-32/ /usr/bin/python
Now you should be able to run python --version in cygwin. To run python shell, unlike in linux where you just run python command, you must add interactive flag: python -i
# Force bash to ignore carriage return (\r) characters used in Windows line separators.
# In .bashrc, add:
(set -o igncr) 2>/dev/null && set -o igncr;
apt-cyg:
lynx -source rawgit.com/transcode-open/apt-cyg/master/apt-cyg > apt-cyg
install apt-cyg /bin
openssh - apt-cyg install openssh
perl - apt-cyg install perl
rsync - apt-cyg install rsync
make - apt-cyg install make
gcc - apt-cyg install gcc-core
cygwin change home directory (My documents in this case) - in /etc/nsswitch.conf add following line db_home: C:\Users\Your_User
Copy user config files from old home folder - cp -R /home/Your_User/.bash* ~/
cygwin enable vim selection - Settings > Mark/Copy > remove vim from exceptions
check/change your aliases in .bashrc as you like
cygwin bash, show git branch in git dir, add these lines to .bash_profile:
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
export PS1="\u@\h \[\033[32m\]\w\[\033[33m\]\$(parse_git_branch)\[\033[00m\] $ "
cmder - http://cmder.net/
cmder open in current directory folder - https://gist.github.com/jojobyte/66c8346ed8948b9b395f
cmder open default cygwin bash - Settings > Startup > Specified named task
cmder - split existing shell to right shortcut: Settings > Keys & Macro > Split: Duplicate active shell split to right > set dropdowns to LAlt + LShify + Right Arrow
clipit alternative - CopyQ (https://github.com/hluk/CopyQ/releases)
check Run on startup in installation wizard
CopyQ settings:
Shortcuts > Show/hide main window = Ctrl + Alt + H
History > uncheck Paste to current window
# Some more helpful tools on Windows:
# Resource monitor - Already integrated tool for memory, network(ports) and CPU analysis and managment, better version of Task Manager
# DBeaver - Open source SQL databses managment tool.
# VSCode - Great open source IDE with lots of plugins
# LockHunter - File/folder unlocker/deleter. Does not contain malicious code like many similar software.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment