Pages in Linux

Git Cheatsheet


Basic Snapshotting git-mv - Move or rename a file, a directory, or a symlink git mv [-v] [-f] [-n] [-k] <source> <destination> rename git mv [-v] [-f] [-n] [-k] <source> … <destination directory> move into existing directory git mv <source> <destination> # rename a directory Branch Related git branch [options] <branchname> git branch # show all branches with current marked with * git branch -vv # show all local and tracked remote branches git checkout dev git branch jesse # creates branch named "jesse" off from "dev" branch git checkout -b jesse # creates and switch to branch "jesse" Merge git merge [options] [<commit>.

Virtualbox Tips for Ubuntu Guest in Windows Host


For Ubuntu tips, see http://jessezhuang.github.io/ article/ubuntu/. How to Get Shared Folder Write Access When used as a virtual machine guest (Ubuntu 14.04LTS in Windows 10 host with Oracle VirtualBox), to get access to shared folder, run the following command in shell, replace username with your ubuntu username.

replace username with your actual ubuntu username $ sudo usermod -a -G vboxsf username After that, reboot the VM and you should have write access to the shared folder.


Vim Cheatsheet


For Ubuntu Linux, Terms: C-x stands for ctrl-x. Generally, use :help <cmd>" for quick ref, e.g.:help undo`. Configuration Configuration file default ~/.vimrc. Can use source <another file> and put the actual vimrc in cloud like dropbox.

to reload an edited vimrc :so $MYVIMRC File operations # to rename a file :E or :Explorer :Te or :Texplorer to open explorer in new tab then :bd to close the new tab R # rename at bottom :bp # go back previous buffer # save the current session including buffers, tabs, and settings :mksession ~/vimSessions/session1.


How to Install Latest Version Vim in Ubuntu 14.04 LTS


Ubuntu comes with Vim-Tiny First of all, Ubuntu 14.04 LTS comes with Vim.Tiny with the version 2:7.4.052-1ubuntu3 which is Vim 7.4.052, already fairly new. Unfortunately I was looking specifically for markdown editing and syntax highlighting and I found that starting from 7.4.480 vim can pick up *.md files as markdown files by default. So I wanted to find a newer version of Vim to install. Install Vim with PPA I have tried to install Vim with debian packages listed on Vim.

Ubuntu Tips and Tricks


Ubuntu version is 14.04 LTS running as a guest OS in Oracle VirtualBox 5. For VirtualBox related issues, see http://jessezhuang.github.io/ article/virtualbox-tips/. Performance Monitoring top from command line System Monitor application installed by default. Screen Capture Application Screenshot installed by default. Can take screenshot of whole screen, current window, or selected area. Similar to “Snipping Tool” in Windows. To run this tool from the shell, use gnome-screeshot -i for interactive window specified with mouse, gnome-screenshot -help for other options.

Linux Cheatsheets


Linux Commands Cheatsheet Files Related ls - list directory contents SYNOPSIS ls [OPTION]… [FILE]… -a, –all do not ignore entries starting with . examples effects ls -la list all file/directories including hidden in long list form ls -ld list directory only in list form du - estimate file space usage SYNOPSIS du [OPTION]… [FILE]… -c, –total produce a grand total -h, –human-readable print sizes in human readable format (e.