Useful Linux Commands
A collection of useful linux commands that can be queried from the command line and within the browser.
The commands and comments inside consists of two languages (English, 简体中文)
Install
git clone https://github.com/hangxingliu/useful-linux-commands.git;cd useful-linux-commands;sudo npm install --global
Usage
As a command line toolkit (CLI)
useful-commands keyword ... # query commandsuseful-commands --help # get help information
the query ways:
useful-commands sshuseful-commands ssh gituseful-commands purge -fdocker # `purge` in docker command setuseful-commands ssh -a6 -b5 # within 5 lines before and 6 lines afteruseful-commands -fdocker # all commands in docker command set
As a web server
default port is 10765
# Way 1: launch server directlyuseful-commands-server -p ${port_number:10765}# Way 2: launch server by pm2PORT=10765 pm2 start ecosystem.prod.yaml; # ecosystem.prod.yaml is profile for production mode# Way 3: launch server by dockersudo docker build -t cmd-query-server .sudo docker run -p 80:10765 -u node -m 256M --memory-swap 1G -d \--name my-cmd-query-server cmd-query-server
the query ways:
# in browser:# input keyword or flag in search input box# in terminal:wget http://domain/keywords -Owget http://domain/keywords?color -Ocurl http://domain/filename/keywords?a=5&b=1curl http://domain/help
Contribute
References: