some common and basic commands for ubuntu (linux)

sudo – “super-user do” (grants administrator rights)

ls – list contents of a directory
cd – change directory
cd .. – one directory back
aptitude – APT package management system (update, install, remove, search)
apt-get install <package name> – install a package
i.e. “apt-get install php5″ will install php5
chmod – change file access permissions
chown – change file and group ownership
cp – copy
mv – move
rm – remove
cat – concatenate files (dump to screen)
cat > <filename> – creates file having name <filename>
vi – advanced text editor
users – users currently logged in
useradd – add a user
usermod – modify existing user
uname – show system data (try uname -a)
mount – mount a file system, cd or removable drive
umount – un-mount a file system, cd or removable drive
top – show current running processes
touch – create new, empty, file
reboot – reboot your system
shutdown / halt – shutdown your system
passwd – change user password
ping – ping a network device or location (ping google.com)
more – show output one screen at a time
exit – logout of the terminal
eject – eject a cdrom or removable device

for more details on above commands just user man.
i.e. man <command>

shutdown / restart ubuntu linux

Shutdown ubuntu linux : sudo halt or sudo shutdown -h now

Restart/reboot ubuntu linux: sudo reboot

start/stop mysql on ubuntu server (linux)

1)Install MySql database: sudo apt-get install mysql-server

2) Start MySql server: /etc/init.d/mysql start

3) Stop MySql server: /etc/init.d/mysql stop

4) Restart MySql server: /etc/init.d/mysql restart

5)Check the status of  MySql server: /etc/init.d/mysql status

change keyboard configuration in ubuntu 8.1 server edition (linux)

you can use the command given below to configure keyboard if it has been configured/mapped incorrectly on ubuntu.

dpkg-reconfigure console-setup