Tuesday, August 16, 2011

Find Out My Linux Distribution Name and Version

lsb_release Command

The lsb_release command displays certain LSB (Linux Standard Base) and distribution-specific information. Type the following command:
$ lsb_release -a
Sample outputs:
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 6.0.1 (squeeze)
Release: 6.0.1
Codename: squeeze

Reference
http://www.cyberciti.biz/faq/find-linux-distribution-name-version-number/

Monday, August 8, 2011

mysql console commands- first aid kit

Connect
> mysql -u root -p
(root password required)

Get a databases list
mysql> show databases;

Switch to a database
mysql> use [bd name];

See all the tables
mysql> show tables;

Show all data in a table
mysql> select * from [tabel name]


References
http://www.cyberciti.biz/faq/mysql-list-databases/
http://www.pantz.org/software/mysql/mysqlcommands.html