Revision: EOL (Last updated on 8th April 2005)
Old Version: http://www.ubuntuguide.org/4.10/index.html
New Version: http://www.ubuntuguide.org
Author: Chua Wen Kiat Blog: http://www.livejournal.com/~jiyuu0
Copyright (C) 2004 Chua Wen Kiat.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
Q: Where to find help for Ubuntu?
Q: Where to find a list of all the programs/libraries that comes with Ubuntu?
Q: How to download this entire guide?
$ cd browse_to_your_download_folder
$ tar xvf ubuntu4.10.tar
Q: How to add extra repositories?
$ sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup
$ sudo gedit /etc/apt/sources.list
...
## Uncomment the following two lines to fetch updated software from the network
# deb http://archive.ubuntu.com/ubuntu warty main restricted
# deb-src http://archive.ubuntu.com/ubuntu warty main restricted
## Uncomment the following two lines to add software from the 'universe'
## repository.
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## universe WILL NOT receive any review or updates from the Ubuntu security
## team.
# deb http://archive.ubuntu.com/ubuntu warty universe
# deb-src http://archive.ubuntu.com/ubuntu warty universe
# deb http://security.ubuntu.com/ubuntu warty-security main restricted
# deb-src http://security.ubuntu.com/ubuntu warty-security main restricted
...
## Uncomment the following two lines to fetch updated software from the network
deb http://archive.ubuntu.com/ubuntu/ warty main restricted
deb-src http://archive.ubuntu.com/ubuntu/ warty main restricted
## Uncomment the following two lines to add software from the 'universe'
## repository.
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## universe WILL NOT receive any review or updates from the Ubuntu security
## team.
deb http://archive.ubuntu.com/ubuntu/ warty universe
deb-src http://archive.ubuntu.com/ubuntu/ warty universe
deb http://security.ubuntu.com/ubuntu/ warty-security main restricted
deb-src http://security.ubuntu.com/ubuntu/ warty-security main restricted
deb http://archive.ubuntu.com/ubuntu/ warty multiverse
deb-src http://archive.ubuntu.com/ubuntu/ warty multiverse
deb ftp://ftp.nerim.net/debian-marillat/ stable main
deb ftp://ftp.nerim.net/debian-marillat/ unstable main
deb ftp://ftp.nerim.net/debian-marillat/ testing main
$ sudo apt-get update
Q: How to backup/restore downloaded repositories cache?
$ mkdir -p $HOME/backup/var/lib/
$ sudo cp -R /var/lib/apt/ $HOME/backup/var/lib/
$ mkdir -p $HOME/backup/var/cache/
$ sudo cp -R /var/cache/apt/ $HOME/backup/var/cache/
$ mkdir -p $HOME/backup/etc/apt
$ sudo cp -R /etc/apt/ $HOME/backup/etc/
$ sudo chown -R $USER $HOME/backup/
$ sudo cp -fR $HOME/backup/var/* /var/
$ sudo cp -fR $HOME/backup/etc/apt/* /etc/apt/
Q: How to manually update Ubuntu?
$ sudo apt-get update
$ sudo apt-get upgrade
Q: How to automatically update Ubuntu?
e.g. Automatically perform update at midnight everyday
* * * * * means minute hour day month year
$ sudo gedit /root/.autoupdates
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin
/usr/bin/apt-get update
/usr/bin/apt-get -y upgrade
$ sudo chmod 500 /root/.autoupdates
$ export EDITOR=gedit && sudo crontab -e
00 00 * * * /root/.autoupdates
Q: How to install Flash Plug-in for Mozilla Firefox?
$ sudo apt-get install flashplayer-mozilla
Q: How to install PDF Reader (Adobe Acrobat Reader)?
$ sudo apt-get install acroread
Q: How to install PDF Reader (Adobe Acrobat Reader) Plug-in for Mozilla Firefox?
$ sudo apt-get install acroread-plugin
Q: How to install Newsreader (Pan)?
$ sudo apt-get install pan
Q: How to install RSS and Atom feed aggregator (Sage) extension for Mozilla Firefox?
Q: How to install Download Manager (Downloader for X)?
$ sudo apt-get install d4x
Q: How to install FTP Client (gFTP)?
$ sudo apt-get install gftp
Q: How to install P2P BitTorrent Client (Azureus)?
$ cd browse_to_your_download_folder
$ sudo tar jxvf Azureus_2.2.0.2_linux.GTK.tar.bz2 -C /opt/
$ sudo chown -R root:root /opt/azureus/
$ nautilus applications:///Internet
File Menu -> Create Launcher
Basic Tab ->
Name: Azureus
Command: /opt/azureus/azureus
Icon: /opt/azureus/Azureus.png
Q: How to install P2P Gnutella Client (LimeWire)?
$ cd browse_to_your_download_folder
$ sudo sh LimeWireLinux.bin
Choose Install Folder Tab ->
Where Would You Like to Install?
/opt/LimeWire
$ nautilus applications:///Internet
File Menu -> Create Launcher
Basic Tab ->
Name: LimeWire
Command: /opt/LimeWire/LimeWire
Q: How to install P2P eMule Client (aMule)?
$ sudo apt-get install amule
Q: How to install Messenger (Skype)?
$ cd browse_to_your_download_folder
$ sudo tar jxvf skype_staticQT-1.0.0.1.tar.bz2 -C /opt/
$ sudo chown -R root:root /opt/skype_staticQT-1.0.0.1/
$ nautilus applications:///Internet
File Menu -> Create Launcher
Basic Tab ->
Name: Skype
Command: /opt/skype_staticQT-1.0.0.1/skype
Icon: /opt/skype_staticQT-1.0.0.1/icons/skype_48_32.png
Q: How to install WinPopup (LinPopUp)?
$ sudo apt-get install libgtk1.2
$ cd browse_to_your_download_folder
$ sudo dpkg -i linpopup_1.2.0-7_i386.deb
$ nautilus applications:///Accessories
File Menu -> Create Launcher
Basic Tab ->
Name: LinPopUp
Command: linpopup
Icon: /usr/share/pixmaps/linpopup.xpm
Q: How to install RAR archiver (rar)?
$ sudo apt-get install rar
Q: How to install extra Fonts?
$ sudo apt-get install xfonts-intl-arabic
$ sudo apt-get install xfonts-intl-asian
$ sudo apt-get install xfonts-intl-chinese
$ sudo apt-get install xfonts-intl-chinese-big
$ sudo apt-get install xfonts-intl-european
$ sudo apt-get install xfonts-intl-japanese
$ sudo apt-get install xfonts-intl-japanese-big
$ sudo apt-get install xfonts-intl-phonetic
$ sudo apt-get install msttcorefonts
Q: How to install Multimedia Codecs?
$ sudo apt-get install gstreamer0.8-plugins
$ sudo apt-get install w32codecs
Q: How to install DVD playback capability?
$ sudo apt-get install libdvdcss2
Q: How to install Multimedia Player (XMMS)?
$ sudo apt-get install xmms
Q: How to install Multimedia Player (RealPlayer)?
$ cd browse_to_your_download_folder
$ chmod +x realplay-10.0.2.608-linux-2.2-libc6-gcc32-i586.bin
$ sudo ./realplay-10.0.2.608-linux-2.2-libc6-gcc32-i586.bin
Enter the complete path to the directory where you want
RealPlayer to be installed. You must specify the full
pathname of the directory and have write privileges to
the chosen directory.
Directory: [/home/chua/RealPlayer]: /opt/RealPlayer
You have selected the following RealPlayer configuration:
Destination: /opt/RealPlayer
Enter [F]inish to begin copying files, or [P]revious to go
back to the previous prompts: [F]: F
Copying RealPlayer files...configure system-wide symbolic links? [Y/n]: Y
enter the prefix for symbolic links [/usr]: /usr
Q: How to install Multimedia Player (xine-ui)?
$ sudo apt-get install xine-ui
Q: How to install Multimedia Plug-in for Mozilla Firefox (Pentium 4)?
$ sudo apt-get install mozilla-mplayer
$ sudo apt-get install mplayer-fonts
Q: How to install Multimedia Plug-in for Mozilla Firefox (Non-Pentium 4)?
$ sudo apt-get install totem-xine
$ sudo apt-get install mozplugger
$ sudo cp /etc/mozpluggerrc /etc/mozpluggerrc_backup
$ sudo gedit /etc/mozpluggerrc
...
application/x-mplayer2: wmv,asf,mov: Windows Media
video/x-ms-asf: asf,asx,wma,wax,wmv,wvx: Windows Media
video/x-ms-wmv: wmv: Windows Media
stream noisy ignore_errors: mplayer -really-quiet -nojoystick -nofs -wid $window -vo xv,x11 -ao esd,alsa9,oss,arts,null -zoom -osdlevel 0 "$file" </dev/null
...
stream noisy ignore_errors: totem "$file" </dev/null
$ rm ~/.mozilla/pluginreg.dat
Q: How to install Audio Editor (Audacity)?
$ sudo apt-get install audacity
$ nautilus applications:///Multimedia
File Menu -> Create Launcher
Basic Tab ->
Name: Audacity
Command: audacity
Icon: /usr/share/audacity/audacity.xpm
Q: How to install J2SE Runtime Environment (JRE)?
$ cd browse_to_your_download_folder
$ sh jre-1_5_0_01-linux-i586.bin
$ sudo mkdir /usr/java
$ sudo mv jre1.5.0_01/ /usr/java/
$ sudo chown -R root:root /usr/java/jre1.5.0_01/
$ sudo ln -s /usr/java/jre1.5.0_01/bin/java /usr/bin/java
$ sudo ln -s /usr/java/jre1.5.0_01/bin/java_vm /usr/bin/java_vm
$ sudo cp /etc/bash.bashrc /etc/bash.bashrc_backup
$ sudo gedit /etc/bash.bashrc
JAVA_HOME=/usr/java/jre1.5.0_01
export JAVA_HOME
PATH=$PATH:$JAVA_HOME/bin
export PATH
$ java -version
Q: How to install J2SE Runtime Environment (JRE) Plug-in for Mozilla Firefox?
$ sudo ln -s /usr/java/jre1.5.0_01/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/mozilla/plugins/
$ sudo ln -s /usr/java/jre1.5.0_01/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/mozilla-firefox/plugins/
Q: How to install Web Authoring System (Nvu)?
$ sudo apt-get install libstdc++2.10-glibc2.2
$ cd browse_to_your_download_folder
$ sudo tar jxvf nvu-0.80-pc-linux2.4.23-gnu.tar.bz2 -C /opt/
$ sudo chown -R root:root /opt/nvu-0.80/
$ sudo /opt/nvu-0.80/nvu
$ nautilus applications:///Office
File Menu -> Create Launcher
Basic Tab ->
Name: Nvu
Command: /opt/nvu-0.80/nvu
Icon: /opt/nvu-0.80/icons/mozicon50.xpm
Q: How to install Project Management Application (Planner)?
$ sudo apt-get install planner
Q: How to install Desktop Publishing Application (Scribus)?
$ sudo apt-get install scribus
Q: How to install Partition Magic Clone (QTParted)?
$ sudo apt-get install qtparted
$ nautilus applications:///System
Remove the existing QTParted Icon
File Menu -> Create Launcher
Basic Tab ->
Name: QTParted
Command: gksudo qtparted
Icon: /usr/share/pixmaps/qtparted.xpm
Q: How to install Firewall (Firestarter)?
$ sudo apt-get install firestarter
$ nautilus applications:///Internet
Remove the existing Firestarter Firewall Tool Icon
$ nautilus applications:///System
Remove the existing Firestarter Firewall Tool Icon
File Menu -> Create Launcher
Basic Tab ->
Name: Firestarter Firewall Tool
Command: gksudo /usr/sbin/firestarter
Icon: /usr/share/pixmaps/firestarter.png
Q: How to list the partition tables?
$ sudo fdisk -l
Q: How to list file system disk space usage?
$ df -T -h
Q: How to list mounted devices?
$ mount
Q: How to create symbolic link for /dev/dvd?
$ sudo ln -sf /dev/cdrom /dev/dvd
$ sudo cp /etc/udev/udev.rules /etc/udev/udev.rules_backup
$ sudo gedit /etc/udev/udev.rules
...
BUS="ide", KERNEL="hd[a-z]", PROGRAM="/etc/udev/cdsymlinks.sh %k", SYMLINK="%c{1} %c{2}"
...
BUS="ide", KERNEL="hd[a-z]", SYMLINK="cdrom dvd"
Q: How to mount/unmount CD/DVD-ROM manually, and show all hidden and associated files?
e.g. Assumed that /media/cdrom0/ is the location of CD/DVD-ROM
$ sudo mount /media/cdrom0/ -o unhide
$ sudo umount /media/cdrom0/
Q: How to forcefully unmount CD/DVD-ROM manually?
e.g. Assumed that /media/cdrom0/ is the location of CD/DVD-ROM
$ sudo umount /media/cdrom0/ -l
Q: How to install NVIDIA graphics driver?
$ sudo apt-get install nvidia-glx
$ sudo apt-get install nvidia-settings
$ sudo nvidia-glx-config enable
$ nautilus applications:///System
File Menu -> Create Launcher
Basic Tab ->
Name: NVIDIA Settings
Command: nvidia-settings
Q: How to disable NVIDIA graphics logo on GNOME startup?
$ sudo cp /etc/X11/XF86Config-4 /etc/X11/XF86Config-4_backup
$ sudo gedit /etc/X11/XF86Config-4
...
Section "Device"
Identifier "NVIDIA Corporation NV34M [GeForce FX Go 5200]"
Driver "nvidia"
BusID "PCI:1:0:0"
...
Option "NoLogo"
Q: How to enhance NVIDIA graphics performance?
$ sudo cp /etc/X11/XF86Config-4 /etc/X11/XF86Config-4_backup
$ sudo gedit /etc/X11/XF86Config-4
...
Section "Device"
Identifier "NVIDIA Corporation NV34M [GeForce FX Go 5200]"
Driver "nvidia"
BusID "PCI:1:0:0"
...
Option "RenderAccel" "true"
Option "NvAGP" "1"
Q: How to install PalmOS Devices?
$ sudo ln -sf /dev/ttyUSB1 /dev/pilot
Q: How to burn files into CD/DVD?
$ nautilus burn:///
Drag files into window
File Menu -> Write to Disc... -> Write
Q: How to create Image (ISO) file from CD/DVD?
e.g. Assumed that /dev/cdrom is the location of CD/DVD-ROM
$ dd if=/dev/cdrom of=file.iso bs=1024
Q: How to create Image (ISO) file from folder?
e.g. Assumed that Folder/ is the location of folder
$ mkisofs -RJ -o file.iso Folder/
Q: How to burn Image (ISO) file into CD/DVD?
Right click on Image (ISO) file -> Write to Disc... -> Write
Q: How to mount/unmount Image (ISO) file without burning?
$ sudo mkdir /media/iso
$ sudo modprobe loop
$ sudo mount file.iso /media/iso/ -t iso9660 -o loop
$ sudo umount /media/iso/
e.g. Assumed that /dev/cdrom is the location of CD/DVD-ROM
$ sudo umount /dev/cdrom
$ cdrecord dev=/dev/cdrom blank=all
Q: How to set/change the burn speed for CD/DVD Burner?
/ -> apps -> nautilus-cd-burner -> default_speed (set/change the burn speed for CD/DVD Burner)
Q: How to enable burnproof for CD/DVD Burner?
/ -> apps -> nautilus-cd-burner -> burnproof (Checked)
Q: How to enable overburn for CD/DVD? Burner?
/ -> apps -> nautilus-cd-burner -> overburn (Checked)
Q: How to generate MD5 checksum file?
$ md5sum file.iso > file.iso.md5
Q: How to check MD5 checksum of file?
e.g. file.iso and file.iso.md5 must be in the same folder
$ md5sum -c file.iso.md5
Q: How to configure network connections?
Connections Tab -> Add/Properties/Delete/Activate/Deactivate network connections
DNS Tab -> DNS Servers -> Add/Delete DNS servers
Q: How to change computer name?
General Tab -> Host Settings -> Hostname: Fill in the computer name
Q: How to change computer descriptions?
General Tab -> Windows Networking ->
Enable Windows networking (Checked)
Descriptions: Fill in the computer descriptions
Q: How to change computer Domain/Workgroup?
General Tab -> Windows Networking ->
Enable Windows networking (Checked)
Domain / Workgroup: Fill in the computer Domain/Workgroup
Q: How to access network folder without mounting?
e.g. Network computer's IP: 192.168.0.1
Shared folder's name: linux
smb://192.168.0.1/linux
Q: How to mount/unmount network folder manually?
e.g. Network computer's IP: 192.168.0.1
Network computer's Username: myusername
Network computer's Password: mypassword
Shared folder's name: linux
Local mount folder: /media/sharename
$ sudo mkdir /media/sharename
$ sudo mount //192.168.0.1/linux /media/sharename/ -t smbfs -o username=myusername,password=mypassword
$ sudo umount /media/sharename/
Q: How to mount/unmount network folder manually, and allow all users to read/write?
e.g. Network computer's IP: 192.168.0.1
Network computer's Username: myusername
Network computer's Password: mypassword
Shared folder's name: linux
Local mount folder: /media/sharename
$ sudo mkdir /media/sharename
$ sudo mount //192.168.0.1/linux /media/sharename/ -o username=myusername,password=mypassword,dmask=777,fmask=777
$ sudo umount /media/sharename/
Q: How to mount network folder on boot-up?
e.g. Network computer's IP: 192.168.0.1
Network computer's Username: myusername
Network computer's Password: mypassword
Shared folder's name: linux
Local mount folder: /media/sharename
$ sudo mkdir /media/sharename
$ sudo gedit /root/.smbcredentials
username=myusername
password=mypassword
$ sudo cp /etc/fstab /etc/fstab_backup
$ sudo gedit /etc/fstab
//192.168.0.1/linux /media/sharename smbfs credentials=/root/.smbcredentials 0 0
Q: How to mount network folder on boot-up, and allow all users to read/write?
e.g. Network computer's IP: 192.168.0.1
Network computer's Username: myusername
Network computer's Password: mypassword
Shared folder's name: linux
Local mount folder: /media/sharename
$ sudo mkdir /media/sharename
$ sudo gedit /root/.smbcredentials
username=myusername
password=mypassword
$ sudo cp /etc/fstab /etc/fstab_backup
$ sudo gedit /etc/fstab
//192.168.0.1/linux /media/sharename smbfs credentials=/root/.smbcredentials,dmask=777,fmask=777 0 0
Q: What are the basic things I need to know about securing my Ubuntu?
Q: How to disable all interactive editing control for GRUB menu?
$ grub
grub> md5crypt
Password: ****** (ubuntu)
Encrypted: $1$ZWnke0$1fzDBVjUcT1Mpdd4u/T961 (encrypted password)
grub> quit
$ sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup
$ sudo gedit /boot/grub/menu.lst
...
## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line) and entries protected by the
# command 'lock'
# e.g. password topsecret
# password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret
...
password --md5 $1$ZWnke0$1fzDBVjUcT1Mpdd4u/T961 (encrypted password above)
Q: How to disable history listing in Console mode?
$ rm $HOME/.bash_history
$ touch $HOME/.bash_history
$ chmod 000 $HOME/.bash_history
Q: How to disable Ctrl+Alt+Del from restarting computer in Console mode?
$ sudo cp /etc/inittab /etc/inittab_backup
$ sudo gedit /etc/inittab
...
ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now
...
#ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now
$ sudo telinit q
Q: How to enable prompt before removal and overwritten of files in Console mode?
$ sudo cp /etc/bash.bashrc /etc/bash.bashrc_backup
$ sudo gedit /etc/bash.bashrc
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
Q: How to gain root user access without login?
Q: How to modify kernel boot-up arguments, to gain root user access?
Ubuntu, kernel 2.6.8.1-4-386
kernel /boot/vmlinuz-2.6.8.1-4-386 root=/dev/hda1 ro quiet splash
grub edit> kernel /boot/vmlinuz-2.6.8.1-4-386 root=/dev/hda1 ro quiet splash rw init=/bin/bash
root@(none):/ #
Q: How to use Ubuntu Installation CD, to gain root user access?
[!!] Partition disks
~ # mkdir /ubuntu
~ # fdisk -l /dev/discs/disc0/disc
~ # mount <wherever your Ubuntu root device is> /ubuntu/
~ # chroot /ubuntu/
sh-2.05b#
Q: How to change root user/main user password if forgotten?
# passwd root
# passwd your_system_main_username
Q: How to change GRUB menu password if forgotten?
$ grub
grub> md5crypt
Password: ****** (ubuntu)
Encrypted: $1$ZWnke0$1fzDBVjUcT1Mpdd4u/T961 (encrypted password)
grub> quit
$ sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup
$ sudo gedit /boot/grub/menu.lst
...
password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
...
password --md5 $1$ZWnke0$1fzDBVjUcT1Mpdd4u/T961 (encrypted password above)
Q: How to restore GRUB menu after Windows installation?
e.g. Assumed that /dev/hda1 is the location of /boot partition
sh-2.05b# grub
grub> root (hd0,0)
grub> setup (hd0)
grub> quit
Q: How to add Windows entry into GRUB menu?
e.g. Assumed that /dev/hda1 is the location of Windows partition
$ sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup
$ sudo gedit /boot/grub/menu.lst
title Windows 95/98/NT/2000
root (hd0,0)
makeactive
chainloader +1
savedefault
Q: How to read Linux partitions (ext2, ext3) in Windows?
Q: How to mount/unmount Windows partition (NTFS) manually, and allow all users to read only?
e.g. Assumed that /dev/hda1 is the location of Windows partition (NTFS)
Local mount folder: /media/windows
$ sudo mkdir /media/windows
$ sudo mount /dev/hda1 /media/windows -t ntfs -o umask=0222
$ sudo umount /media/windows
Q: How to mount/unmount Windows partition (FAT) manually, and allow all users to read/write?
e.g. Assumed that /dev/hda1 is the location of Windows partition (FAT)
Local mount folder: /media/windows
$ sudo mkdir /media/windows
$ sudo mount /dev/hda1 /media/windows -t vfat -o umask=000
$ sudo umount /media/windows
Q: How to mount Windows partition (NTFS) on boot-up, and allow all users to read only?
e.g. Assumed that /dev/hda1 is the location of Windows partition (NTFS)
Local mount folder: /media/windows
$ sudo mkdir /media/windows
$ sudo cp /etc/fstab /etc/fstab_backup
$ sudo gedit /etc/fstab
/dev/hda1 /media/windows ntfs umask=0222 0 0
Q: How to mount Windows partition (FAT) on boot-up, and allow all users to read/write?
e.g. Assumed that /dev/hda1 is the location of Windows partition (FAT)
Local mount folder: /media/windows
$ sudo mkdir /media/windows
$ sudo cp /etc/fstab /etc/fstab_backup
$ sudo gedit /etc/fstab
/dev/hda1 /media/windows vfat umask=000 0 0
Q: How to set/change/enable root user password?
$ sudo passwd root
Q: How to disable root user account?
$ sudo passwd -l root
Q: How to allow root user to login into GNOME?
Security Tab -> Options -> Allow root to login with GDM (Checked)
Q: How to switch to root user in Terminal mode?
$ sudo -s -H (specify your user password)
or
$ su (specify your root user password)
Q: How to add/edit/delete system users?
Users Tab -> Add User.../Properties/Delete users
Q: How to add/edit/delete system groups?
Groups Tab -> Add Group.../Properties/Delete users
Q: How to automatic login into GNOME (not secure)?
General Tab -> Automatic Login ->
Login a user automatically on first bootup (Checked)
Automatic login username: Select the username to automatic login
$ export EDITOR=gedit && sudo visudo
your_system_username ALL=(ALL) ALL
Q: How to explicitly destroy the "sudo" session?
$ sudo -K
Q: How to use "sudo" without prompt for password (not secure)?
$ export EDITOR=gedit && sudo visudo
...
your_system_username ALL=(ALL) ALL
...
your_system_username ALL=(ALL) NOPASSWD: ALL
Q: How to browse/edit User Programs Menu?
$ nautilus applications:///
Q: How to browse/edit All Users Programs Menu?
$ sudo nautilus applications-all-users:///
Q: How to change file/folder permissions?
Right click on file -> Properties
Permissions Tab -> Read/Write/Execute (Checked the permissions for Owner/Group/Others)
Q: How to change file/folder ownership?
$ sudo chown -R your_system_username /location_of_your_file_or_folder
Q: How to change file/folder group ownership?
$ sudo chgrp -R your_system_groupname /location_of_your_file_or_folder
Q: How to install Samba Server for file sharing service?
$ sudo apt-get install samba
$ sudo apt-get install smbfs
Q: How to add/edit/delete network users?
$ sudo smbpasswd -a your_system_username
$ sudo gedit /etc/samba/smbusers
your_system_username = "your network username"
$ sudo smbpasswd -a your_system_username
$ sudo smbpasswd -x your_system_username
Q: How to share home folder with read only permission (Authentication=Yes)?
$ sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
$ sudo gedit /etc/samba/smb.conf
...
; security = user
...
security = user
...
# This boolean controls whether PAM will be used for password changes
# when requested by an SMB client instead of the program listed in
# 'passwd program'. The default is 'no'.
; pam password change = no
...
username map = /etc/samba/smbusers
$ sudo testparm
$ sudo /etc/init.d/samba restart
Q: How to share home folder with read/write permissions (Authentication=Yes)?
$ sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
$ sudo gedit /etc/samba/smb.conf
...
; security = user
...
security = user
...
# This boolean controls whether PAM will be used for password changes
# when requested by an SMB client instead of the program listed in
# 'passwd program'. The default is 'no'.
; pam password change = no
...
username map = /etc/samba/smbusers
...
# By default, the home directories are exported read-only. Change next
# parameter to 'yes' if you want to be able to write to them.
writable = no
...
# By default, the home directories are exported read-only. Change next
# parameter to 'yes' if you want to be able to write to them.
writable = yes
$ sudo testparm
$ sudo /etc/init.d/samba restart
Q: How to share group folder with read only permission (Authentication=Yes)?
$ sudo mkdir /home/group
$ sudo chmod 777 /home/group/
$ sudo chmod +t /home/group/
$ sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
$ sudo gedit /etc/samba/smb.conf
...
; security = user
...
security = user
...
# This boolean controls whether PAM will be used for password changes
# when requested by an SMB client instead of the program listed in
# 'passwd program'. The default is 'no'.
; pam password change = no
...
username map = /etc/samba/smbusers
[Group]
comment = Group Folder
path = /home/group
public = yes
writable = no
valid users = your_system_username1 your_system_username2
create mask = 0700
directory mask = 0700
force user = nobody
force group = nogroup
$ sudo testparm
$ sudo /etc/init.d/samba restart
Q: How to share group folder with read/write permissions (Authentication=Yes)?
$ sudo mkdir /home/group
$ sudo chmod 777 /home/group/
$ sudo chmod +t /home/group/
$ sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
$ sudo gedit /etc/samba/smb.conf
...
; security = user
...
security = user
...
# This boolean controls whether PAM will be used for password changes
# when requested by an SMB client instead of the program listed in
# 'passwd program'. The default is 'no'.
; pam password change = no
...
username map = /etc/samba/smbusers
[Group]
comment = Group Folder
path = /home/group
public = yes
writable = yes
valid users = your_system_username1 your_system_username2
create mask = 0700
directory mask = 0700
force user = nobody
force group = nogroup
$ sudo testparm
$ sudo /etc/init.d/samba restart
Q: How to share public folder with read only permission (Authentication=Yes)?
$ sudo mkdir /home/public
$ sudo chmod 777 /home/public/
$ sudo chmod +t /home/public/
$ sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
$ sudo gedit /etc/samba/smb.conf
...
; security = user
...
security = user
...
# This boolean controls whether PAM will be used for password changes
# when requested by an SMB client instead of the program listed in
# 'passwd program'. The default is 'no'.
; pam password change = no
...
username map = /etc/samba/smbusers
[public]
comment = Public Folder
path = /home/public
public = yes
writable = no
create mask = 0777
directory mask = 0777
force user = nobody
force group = nogroup
$ sudo testparm
$ sudo /etc/init.d/samba restart
Q: How to share public folder with read/write permissions (Authentication=Yes)?
$ sudo mkdir /home/public
$ sudo chmod 777 /home/public/
$ sudo chmod +t /home/public/
$ sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
$ sudo gedit /etc/samba/smb.conf
...
; security = user
...
security = user
...
# This boolean controls whether PAM will be used for password changes
# when requested by an SMB client instead of the program listed in
# 'passwd program'. The default is 'no'.
; pam password change = no
...
username map = /etc/samba/smbusers
[public]
comment = Public Folder
path = /home/public
public = yes
writable = yes
create mask = 0777
directory mask = 0777
force user = nobody
force group = nogroup
$ sudo testparm
$ sudo /etc/init.d/samba restart
Q: How to share public folder with read only permission (Authentication=No)?
$ sudo mkdir /home/public
$ sudo chmod 777 /home/public/
$ sudo chmod +t /home/public/
$ sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
$ sudo gedit /etc/samba/smb.conf
...
; security = user
...
security = share
[public]
comment = Public Folder
path = /home/public
public = yes
writable = no
create mask = 0777
directory mask = 0777
force user = nobody
force group = nogroup
$ sudo testparm
$ sudo /etc/init.d/samba restart
Q: How to share public folder with read/write permissions (Authentication=No)?
$ sudo mkdir /home/public
$ sudo chmod 777 /home/public/
$ sudo chmod +t /home/public/
$ sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
$ sudo gedit /etc/samba/smb.conf
...
; security = user
...
security = share
[public]
comment = Public Folder
path = /home/public
public = yes
writable = yes
create mask = 0777
directory mask = 0777
force user = nobody
force group = nogroup
$ sudo testparm
$ sudo /etc/init.d/samba restart
Q: How to install SSH Server for remote administration service?
$ sudo apt-get install ssh
Q: How to SSH into remote Ubuntu machine?
e.g. Assumed that remote Ubuntu machine had installed SSH Server service
Read How to install SSH Server for remote administration service?
Remote Ubuntu machine: 192.168.0.1
$ ssh username@192.168.0.1
Q: How to copy file/folder from remote Ubuntu machine into local machine (scp)?
e.g. Assumed that remote Ubuntu machine had installed SSH Server service
Read How to install SSH Server for remote administration service?
Remote Ubuntu machine: 192.168.0.1
Remote file/folder location: /home/username/remotefile.txt
Local machine save location: . (current directory)
$ scp -r username@192.168.0.1:/home/username/remotefile.txt .
Q: How to copy file/folder from local machine into remote Ubuntu machine (scp)?
e.g. Assumed that remote Ubuntu machine had installed SSH Server service
Read How to install SSH Server for remote administration service?
Local file/folder location: localfile.txt
Remote Ubuntu machine: 192.168.0.1
Remote Ubuntu machine save location: /home/username/
$ scp -r localfile.txt username@192.168.0.1:/home/username/
Q: How to copy file/folder from remote Ubuntu machine into local machine (rsync)?
e.g. Assumed that remote Ubuntu machine had installed SSH Server service
Read How to install SSH Server for remote administration service?
Remote Ubuntu machine: 192.168.0.1
Remote file/folder location: /home/username/remotefile.txt
Local machine save location: . (current directory)
$ rsync -v -u -a --delete --rsh=ssh --stats username@192.168.0.1:/home/username/remotefile.txt .
Q: How to copy file/folder from local machine into remote Ubuntu machine (rsync)?
e.g. Assumed that remote Ubuntu machine had installed SSH Server service
Read How to install SSH Server for remote administration service?
Local file/folder location: localfile.txt
Remote Ubuntu machine: 192.168.0.1
Remote Ubuntu machine save location: /home/username/
$ rsync -v -u -a --delete --rsh=ssh --stats localfile.txt username@192.168.0.1:/home/username/
Q: How to SSH into remote Ubuntu machine via Windows machine?
e.g. Assumed that remote Ubuntu machine had installed SSH Server service
Read How to install SSH Server for remote administration service?
Q: How to copy file/folder from/into remote Ubuntu machine via Windows machine?
e.g. Assumed that remote Ubuntu machine had installed SSH Server service
Read How to install SSH Server for remote administration service?
Q: How to install DHCP Server for automatic IP address assignment?
e.g. Assumed that "eth0" is the interface for network card
IP Address Range: 192.168.0.100 to 192.168.0.200
Subnet Mask: 255.255.255.0
DNS Servers: 202.188.0.133, 202.188.1.5
Domains: tm.net.my
Gateway Address: 192.168.0.1
$ sudo apt-get install dhcp3-server
$ sudo cp /etc/default/dhcp3-server /etc/default/dhcp3-server_backup
$ sudo gedit /etc/default/dhcp3-server
...
INTERFACES=""
INTERFACES="eth0"
$ sudo cp /etc/dhcp3/dhcpd.conf /etc/dhcp3/dhcpd.conf_backup
$ sudo gedit /etc/dhcp3/dhcpd.conf
...
# option definitions common to all supported networks...
option domain-name "example.org";
option domain-name-servers ns1.example.org, ns2.example.org;
default-lease-time 600;
max-lease-time 7200;
...
# option definitions common to all supported networks...
#option domain-name "example.org";
#option domain-name-servers ns1.example.org, ns2.example.org;
#default-lease-time 600;
#max-lease-time 7200;
...
# A slightly different configuration for an internal subnet.
#subnet 10.5.5.0 netmask 255.255.255.224 {
# range 10.5.5.26 10.5.5.30;
# option domain-name-servers ns1.internal.example.org;
# option domain-name "internal.example.org";
# option routers 10.5.5.1;
# option broadcast-address 10.5.5.31;
# default-lease-time 600;
# max-lease-time 7200;
#}
...
# A slightly different configuration for an internal subnet.
subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.100 192.168.0.200;
option domain-name-servers 202.188.0.133, 202.188.1.5;
option domain-name "tm.net.my";
option routers 192.168.0.1;
option broadcast-address 192.168.0.255;
default-lease-time 600;
max-lease-time 7200;
}
$ sudo /etc/init.d/dhcp3-server restart
Q: How to install MYSQL Database Server?
$ sudo apt-get install mysql-server
$ sudo /usr/bin/mysqladmin -u root password your_db_user_password
Q: How to install Apache HTTP Server for HTTP (Web) Server service?
$ sudo apt-get install apache2
Q: How to install PHP for Apache HTTP Server?
$ sudo apt-get install php4
$ sudo apt-get install libapache2-mod-php4
$ sudo /etc/init.d/apache2 force-reload
$ sudo gedit /var/www/testphp.php
<?php phpinfo(); ?>
Q: How to install MYSQL for Apache HTTP Server?
$ sudo apt-get install libapache2-mod-auth-mysql
$ sudo apt-get install php4-mysql
$ sudo /etc/init.d/apache2 restart
Q: How to apt-get the easy way (Synaptic)?
Edit Menu -> Reload Package List
Edit Menu -> Mark All Upgrades... -> Default Upgrade
Edit Menu -> Apply Marked Changes
Edit Menu -> Search... (Specify the package name in Search box)
Select the package to be installed
Package Menu -> Mark for Installation
Edit Menu -> Apply Marked Changes
Select the package to be removed
Package Menu -> Mark for Removal
Edit Menu -> Apply Marked Changes
Q: How to load Web site faster in Mozilla Firefox (disable IPv6)?
Address Bar -> about:config
Filter: -> network.dns.disableIPv6 -> Change the Value to true (Double click)
Q: How to disable beep sound for link find function in Mozilla Firefox?
Address Bar -> about:config
Filter: -> accessibility.typeaheadfind.enablesound -> Change the Value to false (Double click)
Q: How to open each folder in the same window in Nautilus?
/ -> apps -> nautilus -> preferences -> always_use_browser (Checked)
Edit Menu -> Preferences
Views Tab -> Default View -> Show hidden and backup files (Checked)
Q: How to show Desktop Icons (Computer, Home, Trash)?
/ -> apps -> nautilus -> desktop ->
computer_icon_visible (Checked)
home_icon_visible (Checked)
trash_icon_visible (Checked)
Q: How to turn on Num Lock when login into GNOME?
$ sudo apt-get install numlockx
Q: How to keep the content of clipboard into memory in GNOME?
$ cd browse_to_your_download_folder
$ sudo tar jxvf gnome-clipboard-daemon-1.0.bin.tar.bz2 -C /usr/bin/
$ sudo chown root:root /usr/bin/gnome-clipboard-daemon
$ sudo chmod 755 /usr/bin/gnome-clipboard-daemon
$ sudo /usr/bin/gnome-clipboard-daemon &
Startup Programs Tab -> Add ->
Startup Command: /usr/bin/gnome-clipboard-daemon
Order: 80
Q: How to run programs on startup when login into GNOME?
Startup Programs Tab -> Add/Edit/Delete programs
Q: How to change default file type "Open with" program?
Right click on file -> Properties
Open With Tab -> Add
Select the added open with program (Checked)
Q: How to restart GNOME without rebooting computer?
Q: How to switch to Console mode in GNOME?
Q: How to disable beep sound in Terminal mode?
Edit Menu -> Current Profile...
General Tab -> General -> Terminal bell (Un-Checked)
Q: How to remount /etc/fstab without rebooting?
$ sudo mount -a
Q: How to unhide GRUB menu on boot-up?
$ sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup
$ sudo gedit /boot/grub/menu.lst
...
hiddenmenu
...
#hiddenmenu
Q: How to change the timeout seconds for GRUB menu on boot-up?
$ sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup
$ sudo gedit /boot/grub/menu.lst
...
timeout 3
...
timeout X_seconds
Q: How to change default Operating System boot-up for GRUB menu?
$ sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup
$ sudo gedit /boot/grub/menu.lst
...
default 0
...
default X_sequence
Q: How to temporary skip boot-up service?
Q: How to permanently disable/enable boot-up service?
$ sudo chmod -x /etc/init.d/service_name
$ sudo chmod +x /etc/init.d/service_name
Q: How to upgrade from Warty Warthog to Hoary Hedgehog (Beta)?
$ sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup
$ sudo gedit /etc/apt/sources.list
...
## Uncomment the following two lines to fetch updated software from the network
# deb http://archive.ubuntu.com/ubuntu warty main restricted
# deb-src http://archive.ubuntu.com/ubuntu warty main restricted
## Uncomment the following two lines to add software from the 'universe'
## repository.
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## universe WILL NOT receive any review or updates from the Ubuntu security
## team.
# deb http://archive.ubuntu.com/ubuntu warty universe
# deb-src http://archive.ubuntu.com/ubuntu warty universe
# deb http://security.ubuntu.com/ubuntu warty-security main restricted
# deb-src http://security.ubuntu.com/ubuntu warty-security main restricted
...
## Uncomment the following two lines to fetch updated software from the network
deb http://archive.ubuntu.com/ubuntu/ hoary main restricted
deb-src http://archive.ubuntu.com/ubuntu/ hoary main restricted
## Uncomment the following two lines to add software from the 'universe'
## repository.
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## universe WILL NOT receive any review or updates from the Ubuntu security
## team.
deb http://archive.ubuntu.com/ubuntu/ hoary universe
deb-src http://archive.ubuntu.com/ubuntu/ hoary universe
deb http://security.ubuntu.com/ubuntu/ hoary-security main restricted
deb-src http://security.ubuntu.com/ubuntu/ hoary-security main restricted
$ sudo apt-get update
$ sudo apt-get dist-upgrade
Q: Configuring network interfaces... (taking too long to load)
service_name = networking
Q: Synchronizing clock to ntp.ubuntulinux.org... (taking too long to load)
service_name = ntpdate
Q: modprobe: FATAL: Error inserting...
$ sudo cp /etc/hotplug/blacklist /etc/hotplug/blacklist_backup
$ sudo gedit /etc/hotplug/blacklist
pciehp
shpchp
hw_random
$ sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup
$ sudo gedit /boot/grub/menu.lst
...
title Ubuntu, kernel 2.6.8.1-4-386
root (hd0,0)
kernel /boot/vmlinuz-2.6.8.1-4-386 root=/dev/hda1 ro quiet splash
...
title Ubuntu, kernel 2.6.8.1-4-386
root (hd0,0)
kernel /boot/vmlinuz-2.6.8.1-4-386 root=/dev/hda1 ro quiet splash acpi=off apm=off
$ sudo cp /etc/modules /etc/modules_backup
$ sudo gedit /etc/modules
apm
Q: Sorry, no mixer elements and/or devices found
$ gst-register-0.8
Q: How to disable system date/time from being reset to UTC (GMT)?
$ sudo cp /etc/default/rcS /etc/default/rcS_backup
$ sudo gedit /etc/default/rcS
...
UTC=yes
...
UTC=no
Set the correct date/time
$ sudo /etc/init.d/hwclock.sh restart
Q: How to forcefully empty Trash?
$ sudo rm -fr $HOME/.Trash/
This guide was made possible thanks to these people, for which would like to express my greatest appreciation. Please accept my apologies in advance if I have missed out your Web site/name
People from these Web sites
People from these forums
People from these IRC channel
People that contributed in this guide (sorted by name/nick)
Ubuntu Logo, Ubuntu and Canonical are trademarks of Canonical Ltd.