Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

Tuesday, November 27, 2012

Good collection of Linux Tutorials

EduChoices published an excellent list of Linux tutorials. The list includes tutorials for Linux newbies and experts alike.
Check it out, a must have if you into Linux The list below was taken from EduChoices.

Linux and UNIX Training for Beginners

Free Linux Tutorials for Beginners

  • Introduction to Linux – This IBM tutorial is designed for people who want to learn what Linux is and how it can be used.
  • Linux Desktop 101 – This 14-week course teaches students how to run the Linux operating system on a PC.
  • Hands-On Introduction to Linux – Machtelt Garrels’ well-organized tutorial provides a hands-on introduction to Linux.
  • Real Time Linux Introduction – A series of introductory Linux tutorials from the National Institute of Standards and Technology.
  • Getting Started with Linux – This 20-lesson course from Linux Online is designed for people who are just getting started with Linux.
  • Linux Fundamentals Course – The Shuttleworth Foundation’s fundamentals course takes approximately 18 hours to complete and gives students a basic understanding of the Linux operating system.
  • The 35-Command Tutorial – This basic Linux tutorial from BeginLinux.org teaches 35 commands that every Linux user should know.
  • Getting Started with Linux Desktop – Novell’s self-study course teaches basic Linux desktop skills.

Free UNIX Tutorials for Beginners

  • UNIX Tutorial for Beginners – The University of Surrey’s beginner’s guide to the UNIX operating system features eight easy-to-follow tutorials.
  • A Basic UNIX Tutorial – This Idaho State University tutorial teaches the fundamental of UNIX computing. The tutorial includes examples and exercises.
  • UNIX Training Manual – This free 88-page training manual utilizes examples to teach UNIX filesystem commands. Not exactly a tutorial, but useful nevertheless.
  • UNIX Command Tutorial – University of Mississippi course that teaches students how to interact with a UNIX operating system and perform various commands.
  • Learn UNIX Tutorial – Soft Lookup’s comprehensive UNIX tutorial can take almost anyone from a beginner to an expert.
  • UNIX – The Bare Minimum – This tutorial, from a UC Davis professor, offers a basic introduction to UNIX.
  • Learning About UNIX – The University of Toronto offers open access to UNIX and Linux course notes. This course focuses on UNIX and Linux tools.
  • What is UNIX? – This tutorial offers a simple introduction to UNIX and offers access to a forum for UNIX beginners.

Linux and UNIX Training for Experts

Free Linux Tutorials for Experts

  • Linux Online’s Course for Advanced Users – This advanced course from Linux Online is fashioned into a series of how-to documents. Designed for people who want to learn more about installation, configuration and maintenance tasks.
  • Linux System Administration Course – This 28-module course provides comprehensive training for system administrators.
  • Kernel Tutorials – The kernel tutorials at HowToForge are a great way for Linux users to learn everything they need to know about kernels.
  • Advanced Routing and Traffic Control Tutorial – This advanced Linux tutorial teaches users about routing, filtering and traffic shaping.
  • Linux Enterprise Server Courses – Novell Training Services offers several different courses for advanced Linux users.
  • Linux Network Administration Course – The Shuttleworth Foundation’s Linux Network Administration Course is split into separate tutorials that teach the fundamentals of network administration.
  • Advanced Linux Programming – This tutorial is actually a book that can be downloaded for free. The book teaches users how to develop Linux software and write sophisticated programming.
  • IBM’s Technical Library – IBM’s Technical Library offers a number of useful tutorials for advanced Linux users.

Free UNIX Tutorials for Experts

  • UNIX for Advanced Users – Indiana University’s UNIX Workstation Support Group offers a great UNIX course for advanced users.
  • Kevin Heard’s UNIX Tutorial – Kevin Heard (UC Berkeley) has a fantastic three-part tutorial that starts with an overview of UNIX and ends with advanced topics.
  • Advanced UNIX Commands – Although this is more of a list than a tutorial, it makes a good reference for advanced UNIX users.
  • Parallel Programming Tutorial – This UNIX tutorial teaches advanced users the ins and outs of parallel programming.
  • Advanced Bash Scripting Guide – This UNIX tutorial from the Linux Document Project starts out with a programming overview and moves on to advanced scripting topics.
  • UNIX Shell Scripting Advanced – VTC has a number of UNIX tutorials that are in video form. This one guides advanced users through their first shell script.
  • Advanced C Shell Programming – This UC Davis tutorial teaches advanced C shell and tcsh programming techniques.

Sort files by size

Here’s how to sort files by size in Linux.
Standard;
ls -lhS
Reverse;
ls -lhSr
Options used;
-l –> print long listing
-h –> print human readable sizes
-S –> sort by file size
-r –> reverse order
Output;
[root@kmon01 log]# ls -lhS
total 70M
-rw-r--r-- 1 root root 36M Mar 31 11:28 messages
-rw-r--r-- 1 root root 15M Mar 31 11:25 cron
-rw-rw-r-- 1 root root 15M Mar 31 04:02 maillog
-rw-rw-r-- 1 root utmp 3.8M Mar 31 11:17 wtmp
-r-------- 1 root root 2.6M Mar 31 11:17 lastlog
-rw-r--r-- 1 root root 1.4M Mar 31 11:13 boot.log
-rw-r--r-- 1 root root 68K Mar 25 04:04 prelink.log
-rw-r--r-- 1 root root 67K May 25 2007 scrollkeeper.log
-rw-r--r-- 1 root root 54K Mar 31 04:02 rpmpkgs
-rw-r--r-- 1 root root 51K Dec 24 2007 xferlog
-rw-r--r-- 1 root root 38K May 25 2007 anaconda.syslog
-rw-r--r-- 1 root root 36K Jun 11 2007 Xorg.0.log
-rw-r--r-- 1 root root 15K Feb 2 10:34 dmesg
-rw-r--r-- 1 root root 13K May 25 2007 anaconda.log

[root@kmon01 log]# ls -lhrS
total 70M
-rw-r--r-- 1 root root 0 May 25 2007 spooler
-rw-r--r-- 1 root root 0 Mar 25 14:38 secure
-rwx------ 1 postgres postgres 0 May 25 2007 pgsql
-rw-r--r-- 1 root root 0 May 24 2007 mcelog
-rw-r--r-- 1 root root 23 Feb 2 10:35 snmpd.log
-rw-r--r-- 1 root root 715 Sep 1 2009 yum.log
-rw-r--r-- 1 mysql mysql 2.0K Dec 8 2008 mysqld.log
-rw-r--r-- 1 root root 2.1K Feb 2 10:35 acpid
-rw-r--r-- 1 root root 2.7K Mar 22 11:46 btmp
drwxr-xr-x 2 root root 4.0K Mar 31 11:21 httpd
drwxr-xr-x 2 root root 4.0K Mar 10 2006 gdm
drwxr-x--- 2 exim exim 4.0K Sep 9 2005 exim
-rw-r--r-- 1 root root 67K May 25 2007 scrollkeeper.log
-rw-r--r-- 1 root root 68K Mar 25 04:04 prelink.log
-rw-r--r-- 1 root root 1.4M Mar 31 11:13 boot.log
-r-------- 1 root root 2.6M Mar 31 11:17 lastlog
-rw-rw-r-- 1 root utmp 3.8M Mar 31 11:17 wtmp
-rw-rw-r-- 1 root root 15M Mar 31 04:02 maillog
-rw-r--r-- 1 root root 15M Mar 31 11:25 cron
-rw-r--r-- 1 root root 36M Mar 31 11:29 messages

How to Fix Ubuntu 10.10 VirtualBox Guest Additions Problems

If you’re trying to run Ubuntu 10.10 Beta on your VirtualBox, you’re most likely having issues with the screen resolution. Installing the default VirtualBox client doesn’t quite help. Try the steps below,
1. Open terminal and enter the following command:
#sudo apt-get update
#sudo apt-get install build-essential linux-headers-$(uname -r)
#sudo apt-get install virtualbox-ose-guest-x11

2. Once installation is finished, restart your VirtualBox machine.
3. Go to System –>Preferences –>Monitors and change the resolution of your screen. You might be able to change the resolution but the screen will re-size properly when you maximize.

How to reset your Gnome desktop

So you messed up the Gnome desktop and don’t know how to restore it back to it’s default settings. Here’s how with no risks.
1. Log out and then hit “Ctrl + ALT + F1″ to opening up a terminal.
2. Delete the following directories.
.gnome .gnome2 .gconf .gconfd .metacity
Or run the this command.
rm -rf rm -rf .gnome .gnome2 .gconf .gconfd .metacity
3. “Ctrl + ALT + F7/F8″ and log in as usual.
This guide is based on Ubuntu 10.10

Restart network service in Ubuntu

Here’s how to restart the network service on Ubuntu without restarting the OS
:~$ sudo /etc/init.d/networking restart

How to install Google Chrome on Fedora 16

Fedora 16 just came out and here’s how to get Google Chrome on it.
Start by creating a repository file for Google called google.repo and place it in /etc/yum.repos.d/ .
sudo vim /etc/yum.repos.d/google.repo

Add the lines below into the repository file. google.repo
[google-chrome]
name=google-chrome - 64-bit
baseurl=http://dl.google.com/linux/chrome/rpm/stable/x86_64
enabled=1
gpgcheck=1
gpgkey=https://dl-ssl.google.com/linux/linux_signing_key.pub

Update yum,
sudo yum update
Search for Google Chrome,
sudo yum search google-chrome
Install Google Chrome Stable
sudo yum install google-chrome-stable
If you prefer the beta like me then run,
sudo yum install google-chrome-beta

How to get Hard Disk Details on Linux

Here’s a quick way to find out more about your hard disk. You can get the serial number, part number, firmware level, size and much more. Just see the sample below.
hdparm -I [device]
hdparm -I /dev/sda
[danesh@pandora Movies]$ sudo hdparm -I /dev/sda
/dev/sda:
ATA device, with non-removable media
Model Number: WDC WD2500JS-75NCB3
Serial Number: WD-WCANKF265386
Firmware Revision: 10.02E04
Standards:
Supported: 7 6 5 4
Likely used: 8
Configuration:
Logical max current
cylinders 16383 16383
heads 16 16
sectors/track 63 63
--
CHS current addressable sectors: 16514064
LBA user addressable sectors: 268435455
LBA48 user addressable sectors: 488281250
Logical/Physical Sector size: 512 bytes
device size with M = 1024*1024: 238418 MBytes
device size with M = 1000*1000: 250000 MBytes (250 GB)
cache/buffer size = 8192 KBytes
Capabilities:
LBA, IORDY(can be disabled)
Queue depth: 32
Standby timer values: spec'd by Standard, with device specific minimum
R/W multiple sector transfer: Max = 16 Current = 16
Recommended acoustic management value: 128, current value: 128
DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 udma5 *udma6
Cycle time: min=120ns recommended=120ns
PIO: pio0 pio1 pio2 pio3 pio4
Cycle time: no flow control=120ns IORDY flow control=120ns
Commands/features:
Enabled Supported:
* SMART feature set
Security Mode feature set
* Power Management feature set
* Write cache
* Look-ahead
* Host Protected Area feature set
* WRITE_BUFFER command
* READ_BUFFER command
* NOP cmd
* DOWNLOAD_MICROCODE
Power-Up In Standby feature set
* SET_FEATURES required to spinup after power up
SET_MAX security extension
* Automatic Acoustic Management feature set
* 48-bit Address feature set
* Device Configuration Overlay feature set
* Mandatory FLUSH_CACHE
* FLUSH_CACHE_EXT
* SMART error logging
* SMART self-test
* General Purpose Logging feature set
* Gen1 signaling speed (1.5Gb/s)
* Gen2 signaling speed (3.0Gb/s)
* Native Command Queueing (NCQ)
* Host-initiated interface power management
* Phy event counters
DMA Setup Auto-Activate optimization
Device-initiated interface power management
* Software settings preservation
* SMART Command Transport (SCT) feature set
* SCT Long Sector Access (AC1)
* SCT LBA Segment Access (AC2)
* SCT Error Recovery Control (AC3)
* SCT Features Control (AC4)
* SCT Data Tables (AC5)
unknown 206[12] (vendor specific)
Security:
Master password revision code = 65534
supported
not enabled
not locked
frozen
not expired: security count
not supported: enhanced erase
Checksum: correct

How can non root users mount and unmount in Linux

File systems / partitions are normally managed by root and only root would be able to mount or un-mount.
However, if you want everyone on your machine to have the same privilege for a specific mount point, this is how you can do that.
Add “user” to the mount options for the desired mount point in your /etc/fstab file. In my case “/media/music”
I changed mine from
//192.168.1.200/Music /media/music rw,noauto 0 0

to
//192.168.1.200/Music /media/music cifs user,rw,noauto 0 0

How to configure a static ip in Linux

This is a newbie question I get quite often.
Configuring your Linux machine to run on a static IP is easy. Tools like system-config-network and netconfig provide you simple GUIs to do this.
For today, I’ll show you how to do this from the command line instead.
Navigate to /etc/sysconfig/network-scripts/

[root@baboo]# cd /etc/sysconfig/network-scripts/

Every network interface will have it’s own interface script file. eth0,eth1,eth2 and so on. Vi the ifcfg-eth0 interface script file for interface eth0. Replace the contents of the ifcfg-eth0 file with the parameters below.
[root@baboo]# vi ifcfg-eth0.

DEVICE=eth0
TYPE=Ethernet
ONBOOT=yes
BOOTPROTO=none
IPADDR=192.168.0.100
NETMASK=255.255.255.0
GATEWAY=192.168.0.1
HWADDR=00:0F:22:71:0A:53
USERCTL=no
USERCTL=no

If you want to switch back to DHCP, repeat the steps above and replace the contents of the ifcfg-eth0 file with the parameters below.
DEVICE=eth0
BOOTPROTO=dhcp
HWADDR=00:0F:20:71:0A:50
ONBOOT=yes
TYPE=Ethernet
DHCP_HOSTNAME=klmdrpdr01p.klm1.netcel360.com

Restart your interface to apply the changes.

[root@baboo]#ifdown eth0
[root@baboo]#ifup eth0

To update your dns server settings, modify the /etc/resolv.conf.
[root@baboo]# vi /etc/resolv.conf
Replace the contents of the resolv.conf file with the parameters below. The first parameter “search” is your search path followed the nameserver parameters which hold the IPs for your primary and secondary DNS servers.

search example.com
nameserver 192.168.0.5
nameserver 192.168.0.6

Sunday, November 25, 2012

How to Mount a Remote Folder using SSH on Ubuntu

Connecting to a server across the internet is much more secure using SSH. There is a way that you can mount a folder on a remove server using the SSHFS service.
There are quite a few steps that you’ll have to follow, so get ready and open a terminal window.
First we’ll install the module:
sudo apt-get install sshfs
Now we will use the modprobe command to load it
sudo modprobe fuse
We’ll need to set up some permissions in order to access the utilities. Replace <username> with your username.
sudo adduser <username> fuse
sudo chown root:fuse /dev/fuse
sudo chmod +x /dev/fusermount
Since we’ve added ourselves to a user group, we need to logout and back in at this point before we continue.
Now we’ll create a directory to mount the remote folder in. I chose to create it in my home directory and call it remoteserv.
mkdir ~/remoteserv
Now we have the command to actually mount it. You’ll be prompted to save the server key and for your remote password.
sshfs <username>@<ipaddress>:/remotepath ~/remoteserv
Now you should be able to cd into the directory and start using it as if it was local.
geek@ubuntuServ:~/remoteserv$ ls -l
total 16
drwxr-xr-x 1 951247 155725 4096 2006-12-13 13:30 howtogeek.com
drwxr-sr-x 1 root root 4096 2006-09-11 06:45 logs
drwx—— 1 951247 155725 4096 2006-08-11 16:09 Maildir
drwxrwxr-x 1 951247 155725 4096 2006-10-29 02:34 scripts

Install Samba Server on Ubuntu

If you want to share files between your Ubuntu and Windows computers, your best option is to use Samba file sharing.
To install, first open a terminal window and enter the following command:
sudo apt-get install samba smbfs
We’ve got samba installed, but now we’ll need to configure it to make it accessible. Run the following command to open the configuration file, substituting your editor of choice:
sudo gedit /etc/samba/smb.conf
Find this section in the file:
####### Authentication #######
# “security = user” is always a good idea. This will require a Unix account
# in this server for every user accessing the server. See
# /usr/share/doc/samba-doc/htmldocs/Samba-HOWTO-Collection/ServerType.html
# in the samba-doc package for details.
;  security = user
Uncomment the security line, and add another line to make it look like this:
security = user
username map = /etc/samba/smbusers
This will set Samba to use the smbusers file for looking up the user list.
Create a Samba User
There are two steps to creating a user. First we’ll run the smbpasswd utility to create a samba password for the user.
sudo smbpasswd -a <username>
Next, we’ll add that username to the smbusers file.
sudo gedit /etc/samba/smbusers
Add in the following line, substituting the username with the one you want to give access to. The format is <ubuntuusername> = “<samba username>”.  You can use a different samba user name to map to an ubuntu account, but that’s not really necessary right now.
<username> = “<username>”
Now you can create samba shares and give access to the users that you listed here.

Create a Samba User on Ubuntu

If you are using Samba Server on your network, you will want to create users that have access to use it. There’s a very simple command structure on how to do so.
I’m assuming that you’ve already installed Samba Server at this point.
There are two steps to creating a user. First we’ll run the smbpasswd utility to create a samba password for the user.
sudo smbpasswd -a <username>
Next, we’ll add that username to the smbusers file.
sudo gedit /etc/samba/smbusers
Add in the following line, substituting the username with the one you want to give access to. The format is <ubuntuusername> = “<samba username>”. You can use a different samba user name to map to an ubuntu account, but that’s not really necessary right now.
<username> = “<username>”
Now you can create samba shares and give access to the users that you listed here.

Change your Network Card MAC Address on Ubuntu

There are a lot of reasons you might want to manually set your MAC address for your network card. I won’t ask you what your reason is.
To change this setting, we’ll need to edit the /etc/network/interfaces file. You can choose to use a different editor if you’d like.
sudo gedit /etc/network/interfaces
You should see the line for your network interface, which is usually eth0. If you have dhcp enabled, it will look like this:
auto eth0
iface eth0 inet dhcp
Just add another line below it to make it look something like this:
auto eth0
iface eth0 inet dhcp
       hwaddress ether 01:02:03:04:05:06
Obviously you would want to choose something else for the MAC address, but it needs to be in the same format.
sudo /etc/init.d/networking restart
You will need to restart networking or reboot to take effect.

Change the GRUB Menu Timeout on Ubuntu

When your Ubuntu system boots, you will see the GRUB menu if you hit the Esc key, or if you’ve enabled the menu to show by default. The only issue with this is that the default timeout is only 3 seconds. You may want to increase this amount… or you may even want to decrease it. Either one is simple.
Open up the /boot/grub/menu.lst file in your favorite text editor. I’m using gedit:
sudo gedit /boot/grub/menu.lst
Now find the section that looks like this:
## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 3
The timeout value is in seconds. Save the file, and when you reboot you will have that many seconds to choose the menu item you want.

Change the DHCP IP Address Range for VMware NAT

VMware Workstation includes a network utility that allows you to manage the virtual networks. Typically virtual machines will use NAT (Network Address Translation) to automatically assign a virtual IP address that hides behind your host address, but the default range of 192.168.200.0/24 may not work for everybody.
You can change this address range to anything you like easily. Note that you should not have virtual machines running during this.
First open the Manage Virtual Networks start menu item:

Click the Host Virtual Network Mapping tab, and then click the arrow button next to the VMnet8 dropdown box. VMnet8 is the default NAT adapter for VMware.

Choose the Subnet option, and you will see a dialog where you can change the network range:

Once you have changed the network here, you can click the OK or Apply buttons, and after a few seconds it will update.

Change SSH Welcome Banner on Ubuntu

Every time I connect to my Ubuntu development server through my ssh client, I receive the same message and I’m getting tired of seeing it, so I decided to change the message to something else.
Here’s the message that I get every time:
Linux superfast 2.6.20-16-generic #2 SMP Thu Jun 7 19:00:28 UTC 2007 x86_64
The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.
Last login: Mon Aug 13 01:05:46 2007 from ipaddress removed
geek@superfast:~$
Changing this message requires editing two different files. The first three sections can be modified by editing the following file:
/etc/motd
This file contains the linux build number as well as the Ubuntu warranty message. I don’t find this particularly useful, so I removed all of it and replaced it with my own message.
To disable the last login message (which I don’t recommend doing), you will need to edit the following file in sudo mode:
/etc/ssh/sshd_config
Find this line in the file and change the yes to no as shown:
PrintLastLog no
Now when you login, you’ll get a blank prompt, although I wouldn’t necessarily recommend it because it’s useful to see the last login to the system for security reasons. This is my prompt now:
This is a superfast system. Please max out the cpu accordingly.
Last login: Mon Aug 13 01:24:14 2007 from ipaddress removed
geek@superfast:~$
Linux is really great.

Change or set the MySQL root password

For every database, you should set the root or sa passwords to something other than the default, unless you want to get hacked. For mysql, the system administrator user is called root. You will use the mysqladmin utility from a command line to set the new password. Notice that there are two commands to be run.
Syntax:
mysqladmin -u root password “newpassword”
mysqladmin -u root -h host_name password “newpassword”
Example:
mysqladmin -u root password ws8dr8as3
mysqladmin -u root -h localhost password ws8dr8as3
You will also want to restart the database server after running this command
sudo /etc/init.d/mysql restart

Boot from a USB drive even if your BIOS Won’t Let You

You’ve always got a trusty bootable USB flash drive with you to solve computer problems, but what if a PC’s BIOS won’t let you boot from USB? We’ll show you how to make a CD or floppy disk that will let you boot from your USB drive.
sshot-1
This boot menu, like many created before USB drives became cheap and commonplace, does not include an option to boot from a USB drive.
A piece of freeware called PLoP Boot Manager solves this problem, offering an image that can burned to a CD or put on a floppy disk, and enables you to boot to a variety of devices, including USB drives.
Put PLoP on a CD
PLoP comes as a zip file, which includes a variety of files. To put PLoP on a CD, you will need either plpbt.iso or plpbtnoemul.iso from that zip file. Either disc image should work on most computers, though if in doubt plpbtnoemul.iso should work “everywhere,” according to the readme included with PLoP Boot Manager.
Burn plpbtnoemul.iso or plpbt.iso to a CD and then skip to the “booting PLoP Boot Manager” section.
Put PLoP on a Floppy Disk
If your computer is old enough to still have a floppy drive, then you will need to put the contents of the plpbt.img image file found in PLoP’s zip file on a floppy disk.
To do this, we’ll use a freeware utility called RawWrite for Windows.
sshot-6
We aren’t fortunate enough to have a floppy drive installed, but if you do it should be listed in the Floppy drive drop-down box. Select your floppy drive, then click on the “…” button and browse to plpbt.img. Press the Write button to write PLoP boot manager to your floppy disk.
sshot-7
Booting PLoP Boot Manager
To boot PLoP, you will need to have your CD or floppy drive boot with higher precedence than your hard drive. In many cases, especially with floppy disks, this is done by default.
If the CD or floppy drive is not set to boot first, then you will need to access your BIOS’s boot menu, or the setup menu. The exact steps to do this vary depending on your BIOS – to get a detailed description of the process, search for your motherboard’s manual (or your laptop’s manual if you’re working with a laptop).
In general, however, as the computer boots up, some important keyboard strokes are noted somewhere prominent on the screen. In our case, they are at the bottom of the screen.
sshot-18
Press Escape to bring up the Boot Menu. Previously, we burned a CD with PLoP Boot Manager on it, so we will select the CD-ROM Drive option and hit Enter.
sshot-2
If your BIOS does not have a Boot Menu, then you will need to access the Setup menu and change the boot order to give the floppy disk or CD-ROM Drive higher precedence than the hard drive. Usually this setting is found in the “Boot” or “Advanced” section of the Setup menu.
sshot-17
If done correctly, PLoP Boot Manager will load up, giving a number of boot options.
sshot-3
Highlight USB and press Enter.
sshot-4
PLoP begins loading from the USB drive.
sshot-5
Despite our BIOS not having the option, we’re now booting using the USB drive, which in our case holds an Ubuntu Live CD!
sshot-8
This is a pretty geeky way to get your PC to boot from a USB…provided your computer still has a floppy drive. Of course if your BIOS won’t boot from a USB it probably has one…or you really need to update it.

Backup MySQL Database to a file

Backing up your database is a very important system administration task, and should generally be run from a cron job at scheduled intervals. We will use the mysqldump utility included with mysql to dump the contents of the database to a text file that can be easily re-imported.
Syntax:
mysqldump -h localhost -u root -pmypassword databasename > dumpfile.sql
Example:
mysqldump -h localhost -u root -p2Uad7as9 database01 > dumpfile.sql
This will give you a text file containing all the commands required to recreate the database.

Allow Remote Control To Your Desktop On Ubuntu

Enabling remote desktop mode is extremely easy on Ubuntu since Dapper. You can allow other users to access your desktop using the VNC Viewer utility that is bundled with Ubuntu, or offered as a free download for Windows.
Note that enabling remote control of your desktop is never a safe thing to do unless you have a firewall installed and configured correctly, and even then is still a potential security problem. Now that you’ve been warned of the risks, let’s move on.
Navigate to the System \ Preferences \ Remote Desktop on the Gnome top menu.
You’ll see this window:

The first two checkboxes need to be checked in order for remote desktop to be enabled.
The Security section is important: If you select the “Ask you for confirmation” code, then you will need to be at the computer in order to allow the other person to access your desktop. If you are trying to remotely access one of your own computers, you will want to uncheck this box.
The second checkbox should always be checked, and you should enter a secure password. You will be prompted for this password when you try to log on.