Skip to main content

Posts

Showing posts with the label command

Basic tmux commands

Here are several basic commands for tmux , a terminal multiplexer. tmux list -> list all the session tmux attach -> attach the last session In session (or any window): Ctrl + b, c -> create window Ctrl + b, n -> next window Ctrl + b, p -> previous window Ctrl + b, l -> last window Ctrl + b, d -> detach session Ctrl + b, :rename-window New_Name_FOR_WINDOW -> rename current window In a window exit -> exist a window Reference Cheatsheet

Install python-mysqldb with lampp on Ubuntu

I try to download python-mysqldb from " http://sourceforge.net/projects/mysql-python/" and run the build/install command: python setup.py build I receive this message: EnvironmentError: mysql_config not found I set mysql_config to "/opt/lampp/bin/mysql_config" (I use lampp) and encounter this error message: cc1: error: unrecognized command line option "-mpentiumpro" cc1: warning: command line option "-felide-constructors" is valid for C++/ObjC++ but not for C cc1: warning: command line option "-fno-rtti" is valid for C++/ObjC++ but not for C error: command 'gcc' failed with exit status 1 so I type sudo apt-get install python-mysqldb and find that I can finally import MySQLdb in python

screen command on linux

ctrl-a-c: create a new screen ctrl-a-n: switch to next screen ctrl-a-p: switch to previous screen ctrl-a-d: detach ctrl-a A: set title screen -ls: look up how many screens you open screen -r number(process_id?): switch to that screen

Linux Command

cat your_file_path : print (read) file (顯示,閱讀文字檔案) pppoeconf : configure ADSL connection (設定 ADSL 連線) updatedb: build the index of whole system (建立索引) locate keyword: locate the index builded by updatedb (搜尋檔案) ps2pdf: convert ps to pdf (把 ps 轉換成 pdf 檔案) sudo apt-get update: update the source list sudo apt-get install wanted_package: install the package (安裝軟體) sudo apt-get upgrade: upgrade the system apt-cache showpkg: show basic information of the package, like version, dependency...