Skip to content
Zhengyuan Zhu
Go back

Commonly Used Linux Software

vim Most Commonly Used: Frequency from High to Low

A level

B level

1
2
3
4
Press v to enter visual mode; press y to copy; press p to paste

Copy lines 9 to 15 to line 16
:9,15 copy 16

vimium (Browser Tool)

gg: go to top of page G: go to bottom of page d: scroll down one page u: scroll up one page f: open link in current page F: open link in new page

Multi-window Management Tool Screen

Most Commonly Used Commands

1
screen or screen -S yourname
1
screen -r <screen_pid>

Note: If you cannot enter session after unexpected disconnection, you need:

1
screen -D -r <screen_pid>

View all screen sessions

1
screen -ls
1
control+A d
1
control+A k
1
screen -wipe

virtualenv Environment Management

1
pip install virtualenv

Create virtual environment for project

1
2
3
4
$ cd project_dir
$ virtualenv venv_name
Choose python interpreter for environment:
$ virtualenv -p /usr/bin/python2.7 venv_name

Use virtual environment:

1
$ source venv_name/bin/activate
1
$ . venv_name/bin/deactivate

anaconda

1
$ wget anaconda_latest_version_url
1
$ bash anaconda_latest_version
1
2
echo 'export PATH="~/your_anaconda_version/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
1
2
3
4
5
6
7
8
9
10
11
# Create environment
conda create --name your_env_name python=your_python_version
# Activate environment
source activate your_env_name
# Deactivate environment
deactivate your_env_name
# Delete environment
conda remove -name your_env_name --all
# View installed environments
conda info -e

JupyterNotebook

Famous software. I usually use Pycharm as my IDE. However, recently while studying Yjango’s code, I discovered that JupyterNotebook has unique advantages in demonstration and teaching (cell functionality).

Command Mode Common Instructions

matplotlib Integration

Adding the following code at the top of the file allows images to be displayed in the code. This operation saves the trouble of closing a bunch of images at once.

1
%matplotlib inline

Commitizen

This small tool is specifically designed to reduce the feeling of being at a loss for words when doing commit -m and the feeling of helplessness during code review.

1. Installation (mac environment)

2. Usage

3. Advanced Usage

Actual usage screenshot

Actual usage screenshot

Actual usage screenshot

4. Final Stage Usage

Generate Change log:

Actual usage screenshot

Linux Database Common Commands

mysql

1
2
3
4
5
mysql.server start
mysql -u root -p

References and citations


Share this post on:

Previous Post
Commonly Used Linux Commands
Jack the orange tabby cat
I'm Jack 🧡
Luna the tuxedo cat
I'm Luna! 🖤