Archive

Posts Tagged ‘ubuntu’

How to Mount an ISO image under Ubuntu!

June 17th, 2010 madiga 1 comment

Command line is where I live in the *NIX world.  At Mynitor.com, we’ll be posting a few quickies on how to do various things via command line.   In this post, we’ll show you how to mount an ISO image under Ubuntu Linux.  It’s pretty much similar on other Linux flavors as well.

First make sure you su to root or use sudo.   I generally like to become root user when I want to roam around my system and I very rarely use sudo because I don’t feel

# mkdir /tmp/iso

# modprobe loop

# mount filename.iso /tmp/iso -t iso9660 -o loop

Simply browse into /tmp/iso to see list of assets in the ISO.

Enjoy!!

Categories: linux Tags: , ,

101 Ubuntu Tips, Tricks and Tutorials

January 27th, 2010 madiga No comments

If you’re thinking of switching to Ubuntu from Windows, don’t waste your time thinking too much. Switch to Ubuntu now and you’ll never think about going back. Windows maybe more popular but Linux isn’t too far behind and Ubuntu distro is one of the main reasons.

Ubuntu is the simplest, easiest, and a very stable Linux distribution to switch to from Windows.  This is an older article I had written sometime ago on my other blog and since that domain got expired, I’ve been bringing over my older articles over to this one.

The 101 list below has gained recognition as very helpful tutorials. Everyone can benefit from it so for this reason we’ve compiled all our favorites into one page.

  1. Official Ubuntu Home Page
  2. Official Ubuntu Forums
  3. Official Ubuntu Guide
  4. Wubuntu – Ubuntu Web Edition
  5. Windows to Ubuntu Transition Guide
  6. 10 Advantages of Ubuntu over Vista
  7. 30 Days with Ubuntu Linux
  8. 60 Days With Ubuntu
  9. Installing Ubuntu Linux!
  10. FREE Linux Books online
  11. The Ultimate Linux Reference Guide for Newbies
  12. Top 10 Linux commands for Absolute Newbies
  13. The Ultimate Linux Network Reference Guide for Newbies
  14. Install and run Ubuntu without disturbing Windows
  15. Basics to Linux Explained
  16. Windows Desktop Software and The Linux Alternatives
  17. The best reason yet to use Ubuntu
  18. How to install Anything in Ubuntu!
  19. How to Build Triple Boot (XP, Vista, Ubuntu) with single Boot Screen
  20. Windows Based Ubuntu Installer – Screenshots and demo
  21. Instlux: Install Linux while still in Windows!
  22. Ubuntu Linux Vs. Windows Vista: The Battle For Your Desktop — Ubuntu Linux
  23. Ten tips for new Ubuntu users
  24. 13 Must Do things on new Ubuntu 7.04 Feisty Fawn installation
  25. Hack Attack: Top 10 Ubuntu apps and tweaks
  26. How To Set Up A Ubuntu/Debian LAMP Server
  27. The Perfect Desktop – Ubuntu 7.04 Feisty Fawn
  28. The Perfect Desktop – Ubuntu Studio 7.04
  29. The Perfect Setup – Ubuntu Feisty Fawn (Ubuntu 7.04)
  30. How To Install Internet Explorer On Ubuntu
  31. Change the menu bar and main menu logos in Ubuntu
  32. How To Compile A Kernel – The Ubuntu Way
  33. How to Configure an $80 File Server in 45 Minutes
  34. Installing Popular Applications On Your Ubuntu Desktop With Automatix2
  35. Bandwidth Monitoring Tools for Ubuntu Users
  36. Running Internet Explorer in Ubuntu Linux
  37. How To Use NTFS Drives/Partitions Under Ubuntu
  38. Installing The Native Linux Flash Player 9 On Ubuntu
  39. Mount a Remote Folder using SSH on Ubuntu
  40. Clone Your Ubuntu installation
  41. Speed Up Firefox web browser
  42. Install Popular Applications in Ubuntu Feisty Fawn Using Automatix2
  43. How to Install Java Runtime Environment (JRE) in Ubuntu
  44. How to Install Beryl with latest nvidia drivers in Ubuntu Feisty Fawn
  45. How To Install VMware Server On Ubuntu 7.04
  46. DNS server Setup using bind in Ubuntu
  47. NFS Server and Client Configuration in Ubuntu
  48. Dual Monitors with NVidia in Ubuntu
  49. Howto Set Flickr images as Ubuntu desktop wallpaper
  50. Sharing Internet Connection in Ubuntu
  51. 10 must have programs for a new Ubuntu user
  52. 10 minutes to run every Windows app on your Ubuntu desktop
  53. How-To: Ubuntu Media Server
  54. How-to: Cheap Ubuntu Media Server Part 2
  55. HOWTO Encrypt CD/DVDs in Ubuntu
  56. How-to: Installing Ubuntu Linux on a usb pendrive
  57. Install KDE Desktop in Ubuntu
  58. Set Windows as Default OS when Dual Booting Ubuntu
  59. Official Ubuntu Linux Desktop Guide
  60. 100+ Ubuntu Tutorials and Growing Fast!
  61. Ubuntu and wireless – now better than Windows!
  62. LifeHacker Top 10 Ubuntu applications
  63. Running OSX and Windows XP/Vista on Ubuntu
  64. Awesome Ubuntu Apps you might not know about
  65. Completely mod Ubuntu to look like OS X
  66. Cracking WEP with Ubuntu
  67. 6 Best Ubuntu Tweaks out there
  68. 100 Useful Ubuntu Links – Everything you could ever need!
  69. Ultimate Ubuntu performance tweaking guide
  70. Transform Your Ubuntu’s Look
  71. Ubuntu tricks – how to mount your WinXP partition, make it read/writabable
  72. HOWTO: Ubuntu Customization Guide Part I
  73. Cleaning up a Ubuntu GNU/Linux system
  74. Super Fast Internet for Ubuntu
  75. Speed up the Internet in Ubuntu
  76. How-to: Theming your Ubuntu desktop
  77. 11 Things You Haven’t Seen Yet in Ubuntu Feisty Fawn
  78. 300+ Easily Installed Free Fonts for Ubuntu
  79. Ubuntu Performance Guides
  80. Ubuntu Tutorials
  81. 10 most popular Ubuntu sites on the net
  82. Ubuntu Feisty Fawn Performance Guide
  83. Set-up a Ubuntu webcam security system
  84. Instructions to install NTFS-3G in Ubuntu Dapper
  85. How to achieve native NTFS write support under Linux
  86. Hacking Ubuntu to Improve Performance
  87. Ubuntu and Your iPod…
  88. How to Access Your Ubuntu Remotely
  89. How to make OpenOffice run faster in Ubuntu
  90. Dual Monitors HOWTO
  91. DvdShrink For Linux – How To Install On Ubuntu
  92. 13 Applications to Install on Ubuntu/Linux running on Slow Computer
  93. How to Setup Your ubuntu Computer to be a Router
  94. Improve performance in Ubuntu
  95. How to gracefully reboot your Ubuntu/Debian system if all else fails
  96. Good Ubuntu Networking Tutorial for Beginners and advanced users
  97. Top 10 Ubuntu Tips
  98. Scheduling for Absolute Beginners
  99. Building a Linux home media center
  100. Ubuntu Customization Kit
  101. Remote Desktop for Linux

There is so much more. If you’re new to Linux and Ubuntu, go with the first 20 items to get you up to speed.

Categories: linux Tags:

Windows XP for Ubuntu

December 8th, 2009 madiga No comments

If you love Windows so much and can’t get yourself to make that switch to Ubuntu Linux, then maybe this little video could push you one extra strep to consider Linux.

This video was embedded using the YouTuber plugin by Roy Tanck. Adobe Flash Player is required to view the video.

Download the package and install.  It’s easy as that.  The installation steps are shown in the video itself.

So go ahead, make the switch and start using Linux, I mean keep using Windows… By using windows XP on your own Ubuntu workstation, you won’t miss Windows platform especially if all you use it for is just browsing the Internet and doing homework.

If you want to see Ubuntu look like your Macbook, check out this video and get the theme:

This video was embedded using the YouTuber plugin by Roy Tanck. Adobe Flash Player is required to view the video.

Check out linux-xp.com and xpde.com where it’s got it’s own distro and xpde has a complete desktop environment with the same idea behind using Windows themes on Linux.

Good luck!

Categories: linux Tags:

Ubuntu Q&A for Absolute Beginners

December 1st, 2009 madiga No comments

Instead of writing a long boring article, I thought why not list the solutions in a simple Q&A format? The following is a list of random but basic solutions for Ubuntu beginners.

Q) Should I install Ubuntu or Redhat or Suse or something else, please advise?!
A) Ubuntu is probably best if you’re an absolute newbie. It almost comes with all the drivers and has no problems detecting your wireless card or anything else attached to your laptop/PC.  For me it worked like a charm, all devices detected. Another reason I like it is because it is lightweight.

It is free and entire OS for desktop is in one CD as oppose to 5 CDs for SuSE and 4-5 for Fedora! They even mail you a CD for free.  There are several flavors  of Ubuntu: Kubuntu (KDE Version), Xubuntu and Edubuntu.  Go to  http://www.ubuntu.com now and download!   Also, a good source for different flavors of LINIX is http://www.linuxiso.org/

Q) Installing Ubuntu freezes half way. What’s going on??
A) This maybe because of compatability issue with your hardware. However, try doing the basic first.  Re-download the ISO and burn a new CD, sometimes the contents somehow get corrupt.  Last thing you can do is try installing it on another PC and see if it has same problem.

Q) How can I turn my Ubuntu Desktop into a server??
A) The beauty of Linux is that it can be whatever you want it to be. Only difference is server edition comes preconfigured with some servera apps.  There is nothing to stop you from installing whatever server application though. Good luck.

Q) How do I tell which package a file belongs to?? Like a library file for example?
A) First make sure you have apt-file installed. If you don’t do ‘apt-get install apt-file‘.  To discover to which package a file belongs type: apt-file search filename.  If you want to install a package but don’t know exact name, you can use ‘apt-file‘ to find the package name, just type: apt-file list packagename. apt-file keeps a database of which files all packages contain and it needs to be up-to-date. Type: apt-file-update

Q) How do I tell my version and kernel of Linux??
A) Several ways to do this:
uname -a
cat /etc/issue
cat /proc/version

Q) How can I install the GUi on Ubuntu Server?
A) Simply type the following command: sudo apt-get install ubuntu-desktop to install Gnome:  ‘sudo apt-get install kubuntu-desktop‘ adds KDE to Ubuntu

Q) Is there an AntiVirus software for Ubuntu or Linux in general?
A) Sure. Everyone recommends ClamAV. Visit http://www.clamav.net and fetch the download.

Q) My X windows crap out with some errors. How can i get more info??
A) Check /var/log/Xorg.0.log for any hints on why X failed to start.

Q) I lost my root password for Ubuntu? How do I get it back in?
A) Do the following:

1) Reboot
2) In GRUB, press ‘a’ to add parameters to the kernel. Add a space and 1
3) Now you’re logged in single-user mode with root logged in. Simply reset root password.

Or you can also:

1) Boot with live CD
2) Mount / partition to /tmp
3) edit /etc/shadow and clear password field so root looks something like this: root:0:0:99399:1::::
4) You can reboot normally and just type ‘root’. You’ll be in the system with using a password.

Q) How do I get my XP to see my Linux partition?
A) Windows XP lacks support for reading/writing to Linux file system. You can get Ext2 file system for Windows from http://www.fs-driver.org/

Q) How do I install FireFox?
A) Great article that’ll guide you: http://ubuntuforums.org/showthread.php?t=330386
Linux is probably the best operating system out there. You’ll start loving it and wonder what you were doing using Windows all these years!

I’ve also compiled a list of resources that can be used to improve performance on your Ubuntu operating system.

Ubuntu Performance Guides

  1. Hacking Ubuntu to Improve PerformanceThis article includes various hacks to boost Ubuntu’s performance, such as viewing running processes, identifying resources, finding process startups, tuning kernel parameters, and speeding up boot time.
  2. Improve Ubuntu PerformanceThis is an index of threads posted on ubuntuforums.org on how to get the best performance out of your Ubuntu machine.
  3. Optimizing Desktop Performance – Skip to the section titled Ubuntu Services for Performance Tuning to find some performance tips. Excellent article series covering performance techniques on major flavors of Linux.
  4. Only Ubuntu Linux – Performance tip for Ubuntu Edgy and Feisty users by simply editing your /etc/hosts file.
  5. Desktop performance tweaks – Here are a couple of performance tweaks that are nice for desktops/laptops. These tweaks are relatively easy to perform and reasonable safe. Everything you do is on your own risk.
  6. Ubuntu: 32-bit v. 64-bit Performance – Not specific to system tweaking but a nice article comparing performance on a 32-bit vs. a 64-bit server.
  7. Best Ubuntu Guide Ever – This guide has everything you need.
  8. Local DNS Cache for Faster Browsing – Nice article explaining how to use DNS caching to speed up internet browsing on your Ubuntu install.
  9. Super Fast Internet for Ubuntu – Basically you disable ipV6 which apparently conflicts with ipV4. Good post.
  10. Ubuntu/Linux Roundup – Good collection of links/articles for Ubuntu users.
  11. 10 most popular Ubuntu sites on the net – You should definitely visit these top 10 sites which have a wealth of information on using and troubleshooting in Ubuntu.
Categories: linux Tags:

The Ultimate Linux Reference Guide for Newbies

November 24th, 2009 madiga 2 comments
The Ultimate Linux Reference Guide for Newbies
Click Here to download the Ultimate Linux Guide PDF!
FILE AND DIRECTORY BASICS This cateogry also includes utilities that change file/directory properties and permissions
ls List files/directories in a directory, comparable to dir in windows/dos.
ls -la Shows all files (including ones that start with a period), directories, and details attributes for each file.
ls -lSrh Find the biggest files in current directory in human readable format.
cd Change directory (e.g cd /usr/local/bin)
cd ~ Go to your home directory
cd - Go to the last directory you were in
cd .. Go up a directory
cat Print file contents to the screen
cat filename.txt Print the contents of filename.txt to your screen
du -kx | egrep -v “\./.+/” | sort -n Find largest directories in the filesystem.
tail Similar to cat, but only reads the end of the file
tail /var/log/messages See the last 20 (by default) lines of /var/log/messages
tail -f /var/log/messages Watch the file continuously, while it’s being updated
tail -200 /var/log/messages Print the last 200 lines of the file to the screen
head Similar to tail, but only reads the top of the file
head /var/log/messages See the first 20 (by default) lines of /var/log/messages
head -200 /var/log/messages Print the first 200 lines of the file to the screen
more Llike cat, but opens the file one screen at a time rather than all at once
more /etc/userdomains Browse through the userdomains file. hit Spaceto go to the next page, q to quit
less Page through files
od View binary files and data
xxd Also view binary files and data
gv View Postscript/PDF files
xdvi View TeX DVI files
nl Number lines
touch Create an empty file
touch /home/burst/public_html/404.html Create an empty file called 404.html in the directory /home/burst/public_html/
file Attempts to guess what type of file a file is by looking at it’s content.
file * Prints out a list of all files/directories in a directory
cp Copy a file
cp filename filename.bak Copies filename to filename.bak
cp -a /etc/* /root/etc/ Copies all files, retaining permissions form one directory to another.
cp -av * ../newdirectory Copies all files and directories recurrsively in the current directory INTO newdirectory
mv Move a file command
mv oldfilename newfilename Move a file or directory from oldfilename to newfilename
rm delete a file
rm filename.txt deletes filename.txt, will more than likely ask if you really want to delete it
rm -f filename.txt deletes filename.txt, will not ask for confirmation before deleting.
rm -rf tmp/ recursively deletes the directory tmp, and all files in it, including subdirectories.
chmod Changes file access permissions. The set of 3 go in this order from left to right: USER – GROUP – EVERONE 0 = — No permission 1 = –X Execute only 2 = -W- Write only 3 = -WX Write and execute 4 = R– Read only 5 = R-X Read and execute 6 = RW- Read and write 7 = RWX Read, write and execute
chmod 000 No one can access
chmod 644 Usually for HTML pages
chmod 755 Usually for CGI scripts
chown Changes file ownership permissions The set of 2 go in this order from left to right: USER – GROUP
chown root myfile.txt Changes the owner of the file to root
chown root.root myfile.txt Changes the owner and group of the file to root
stat Display file attributes
grep Llooks for patterns in files
grep root /etc/passwd Shows all matches of root in /etc/passwd
grep -v root /etc/passwd Shows all lines that do not match root
ln Create’s “links” between files and directories
ln -s /usr/local/apache/conf/httpd.conf /etc/httpd.conf Now you can edit /etc/httpd.conf rather than the original. changes will affect the orginal, however you can delete the link and it will not delete the original.
wc Word count
wc -l filename.txt Tells how many lines are in filename.txt
find Utility to find files and directories on your server.
find / -name “filename” Find the file called “filename” on your filesystem starting the search from the root directory “/”.
locate filename Find the file name and path of which contains the string “filename”. Run ‘updatedb’ to build index.
rename .html .php *.html Rename all *.html file as *.php
for file in *.html ; do mv $file `echo $file | sed ’s/\(.*\.\)html/\1php/’` ; done Rename all *.html files as *.php
Of course this is more work than previous command…why bother.
find . -uid 320 -exec chown 350 {} \; Change all files with uid 320 to 350.
For all real life find examples check out:

http://johnmeister.com/CS/UNIX/FIND/find-usage.html

EDITORS Most popular editors available on UNIX platforms.
pico / nano
Friendly, easy to use file editor
nano /home/burst/public_html/index.html Edit the index page for the user’s website.
vi Popular editor, tons of features, harder to use at first than pico.  Check out So you want to learn VI?
vi filename.txt Edit filename.txt.
All commands in vi are preceded by pressing the escape key. Each time a different command is to be entered, the escape key needs to be used. Except where indicated, vi is case sensitive.  H — Upper left corner (home)
M — Middle line
L — Lower left corner
h — Back a character
j — Down a line
k — Up a line
^ — Beginning of line
$ — End of line
l — Forward a character
w — Forward one word
b — Back one word
fc — Find
c ; — Repeat find (find next c)
:q! — This force quits the file without saving and exits vi
:w — This writes the file to disk, saves it
:wq — This saves the file to disk and exists vi
:LINENUMBER : EG :25 — Takes you to line 25 within the file
:$ — Takes you to the last line of the file
:0 — Takes you to the first line of the file
emacs Another popular editor. For more commands go to http://www.hsrl.rutgers.edu/ug/emacs_qref.html C-\ t — Tutorial suggested for new emacs users. C-x C-c exit emacs
emacs filename.txt Edit filename.txt.
While you’re in emacs, use the following quickies to get around:
C-x C-f — read a file into emacs
C-x C-s — save a file back to disk
C-x i — insert contents of another file into this buffer
C-x C-v — replace this file with the contents of file you want
C-x C-w — write buffer to specified file
C-f — move forward one character
C-b — move backward one character
C-n — move to next line
C-p — move to previous line
C-a — move to beginning of line
C-e — move to end of line
M-f — move forward one word
M-b — move backword one word
C-v — move forward one screen
M-v — move backward one screen
M-< — go to beginning of file
M-> — go to end of file
sed ’s/Today/Yesterday/g’ infile > outfile Replace all occurance of ‘Today’ with ‘Yesterday’.  Yes days go by so quickly.  Today is already yesterday.  Heck it maybe a few years ago since I’ve written this.
cat file | awk '{NR >=5 && NR <= 10 }' Print out each line between 5 and 10.
NETWORK Some of the basic networking utilities.
w Shows who is currently logged in and where they are logged in from.
who This also shows who is on the server in an shell.
netstat Shows all current network connections.
netstat -an Shows all connections to the server, the source and destination ips and ports.
netstat -rn Shows routing table for all ips bound to the server.
netstat -an |grep :80 |wc -l Show how many active connections there are to apache (httpd runs on port 80)
netstat -lnp Display all open ports with service name.
top Shows live system processes in a formatted table, memory information, uptime and other useful info. While in top, Shift + M to sort by memory usage or Shift + P to sort by CPU usage
top -u root Show processes running by user root only.
route -n Shows routing table for all ips bound to the server.
nslookup yahoo.com Query your default domain name server (DNS) for an Internet name (or IP number) host_to_find.
traceroute yahoo.com Have a look how you messages travel to yahoo.com
ifconfig Display info on the network interfaces.
ifconfig -a Display into on all network interfaces on server, active or inactive..
ping Sends test packets to a specified server to check if it is responding properly
tcpdump Print all the network traffic going through the network.
arp Command mostly used for checking existing Ethernet connectivity and IP address
SYSTEM TOOLS Many of the basic system utilities used to get things done.
ps ps is short for process status, which is similar to the top command. It’s used to show currently running processes and their PID. A process ID is a unique number that identifies a process, with that you can kill or terminate a running program on your server (see kill command).
ps U username Shows processes for a certain user
ps aux Shows all system processes
ps aux –forest Shows all system processes like the above but organizes in a hierarchy that’s very useful!
kill terminate a system process
kill -9 PID Immediately kill process ID
killall program_name Kill program(s) by name. For example to kill instances of httpd, do ‘killall httpd’
du Shows disk usage.
du -sh Shows a summary of total disk space used in the current directory, including subdirectories.
du / -bh | more Print detailed disk usage for each subdirectory starting at the “/”.
last Shows who logged in and when
last -20 Shows only the last 20 logins
last -20 -a Shows last 20 logins, with the hostname in the last field
pwd Print working directory, i.e., display the name of my current directory on the screen.
hostname Print the name of the local host. Use netconf (as root) to change the name of the machine.
whoami Print my login name.
date Print or change the operating system date and time
time Determine the amount of time that it takes for a process to complete + other info.
uptime Show the number days server has been up including system load averages.
uname -a Displays info on about your server such as kernel version.
free Memory info (in kilobytes).
lsmod Show the kernel modules currently loaded. Run as root.
dmesg | less Print kernel messages.
man topic Display the contents of the system manual pages (help) on the topic. Do ‘man netstat’ to find all details of netstat command including options and examples.
man -k ssh Search all man pages for keyword ’ssh’
reboot / halt Halt or reboot the machine.
mount Mount local drive or remote file system.
mount -t auto /dev/fd0 /mnt/floppy Mount the floppy. The directory /mnt/floppy must exist.
mount -t auto /dev/cdrom /mnt/cdrom Mount the CD. The directory /mnt/cdrom must exist.
lsof +D /nfs/mount Return process id of all tasks currently utilizing /nfs/mount directory.  Useful when you’re stuck trying to unmount an NFS mount.
lsof -p <pid> See EVERYTHING that process is doing.  What files are opened, what port it’s listening to and etc.
cat /proc/cpuinfo Display cpu details such as make, model etc.
sudo The super-user do command that allows you to run specific commands that require root access.
fsck Check a disk for errors
COMPRESSION UTILITIES There are many other compression utilities but these are the default and most widely utilized.
tar Creating and Extracting .tar.gz and .tar files
tar -zxvf file.tar.gz Extracts the file
tar -xvf file.tar Extracts the file
tar -cf archive.tar contents/ Takes everything from contents/ and puts it into archive.tar
gzip -d filename.gz gzip -d filename.gz
zip Compress files into.zip
unzip file.zip Extracting .zip files shell command
compress Compress files. compress filename
uncompress Uncompress compressed files. uncompress filename.Z
bzip2 Compress files in bzip2 format
THE (DOT) FILES The good old dot files. Let’s clear up some confusion here by defining each.
.bash_login Treated by bash like .bash_profileif that doesn’t exist.
.bash_logout Sourced by bash login shells at exit.
.bash_profile Sourced by bash login shells after /etc/profile
.bash_history The list of commands executed previously.
.profile Treated by bash like ~/.bash_profile if that and .bash_login don’t exist.
.vimrc Default “Vim” configuration file.
.emacs Read by emacs at startup
CONFIGURATION FILES Listing everything is beyond the scope of this article.
/etc This directory contains most of the basic Linux system-configuration Files.
/etc/init.d Contains the permanent copies of System V–style run-level scripts. These scripts are often linked to files in the /etc/rc?.d directories to have each service associated with a script started or stopped for the particular run level. The ? is replaced by the run-level number (0 through 6). (Slackware puts its run-level scripts in the /etc/rc.d directory.)
/etc/cron* Directories in this set contain files that define how the crond utility runs applications on a daily (cron.daily), hourly (cron.hourly), monthly (cron.monthly), or weekly (cron.weekly) schedule.
/etc/cups Contains files used to configure the CUPS printing service.
/etc/default Contains files that set default values for various utilities. For example, the file for the useradd command defines the default group number, home directory, password expiration date, shell, and skeleton directory
/etc/skel Any files contained in this directory are automatically copied to a user’s home directory when that user is added to the system.
/etc/mail Contains files used to configure your sendmail mail service.
/etc/security Contains files that set a variety of default security conditions for your computer.
/etc/sysconfig Contains important system configuration files that are created and maintained by various services (including iptables, samba, and most networking services).
/etc/passwd Holds some user account info including passwords (when not “shadowed”).
/etc/shadow Contains the encrypted password information for users’ accounts and optionally the password aging information.
/etc/xinetd.d Contains a set of files, each of which defines a network service that the xinetd daemon listens for on a particular port.
/etc/syslogd.conf The configuration file for the syslogd daemon. syslogd is the daemon that takes care of logging (writing to disk) messages coming from other programs to the system.
/var Contains variable data like system logging files, mail and printer spool directories, and transient and temporary files.
/var/log Log files from the system and various programs/services, especially login (/var/log/wtmp, which logs all logins and logouts into the system) and syslog (/var/log/messages, where all kernel and system program message are usually stored).
/var/log/messages System logs. The first place you should look at if your system is in trouble.
/var/log/utmp Active user sessions. This is a data file and as such it can not be viewed normally.
/var/log/wtmp Log of all users who have logged into and out of the system. The last command can be used to access a human readable form of this file.
Apache Shell Commands Some of the basic and helpful apache commands.
httpd -v Outputs the build date and version of the Apache server.
httpd -l Lists compiled in Apache modules
httpd status Only works if mod_status is enabled and shows a page of active connections
service httpd restart Restarted Apache web server
ab -n 20 -c 2 http://www.mynitor.com/ Send 20 requests with concurrency of 2 to server mynitor.com.  Apache benchmark is pretty useful tool for load testing.  Check out 25 free tools to measure website performance.
httpd -k start -c "DocumentRoot /docs/html Start Apache with alternative docroot. Useful for debugging.
httpd -k start -f conf/httpd.conf Start Apache with different config file.
httpd -X Run Apache in debug mode.  This’ll start only one process on which you can use lsof/strace and whatever else to figure out issues.
MySQL Shell Commands Some of the basic and helpful MySQL commands.
mysqladmin processlist Shows active mysql connections and queries
mysqladmin processlist |wc -l Show how many current open connections there are to mysql
mysqladmin drop database Drops/deletes the selected database
mysqladmin create database Creates a mysql database
mysql -u username -p password databasename < data.sql Restores a MySQL database from data.sql
mysqldump -u username -p password database > data.sql Backup MySQL database to data.sql
echo “show databases” | mysql -u root -p password|grep -v Database Show all databases in MySQL server.
mysqldump -u root -p password database > /tmp/database.exp Dump database including all data and structure into /tmp/database.exp
mysqlcheck -u <user> -p<pass> -o <database_name> Optimize all tables in database.
mysql -u root -pmypass -e STATUS | grep -i uptime Check mysql uptime.
Categories: linux Tags: , , ,

Top 10 Ubuntu Tips

November 6th, 2009 madiga No comments

Top 10 Ubuntu Tips

1) How to restart GNOME without rebooting computer

A) Press ‘Ctrl + Alt + Backspace’
or
B) sudo /etc/init.d/gdm restart

2) How to switch to Console mode in GNOME

A) Press ‘Ctrl + Alt + F1′ (F2 – F6)

To switch between consoles in Console mode

B) Press ‘Alt + F1′ (F2 – F6)

To switch back to GNOME mode

C) Press ‘Alt + F7′

3) How to show all hidden files/folders in Nautilus

A) Press ‘Ctrl + H’

To permanently show all hidden files/folders in Nautilus

B) Edit Menu -> Preferences
Views Tab -> Default View -> Show hidden and backup files (Checked)

4) How to load Web site faster in Mozilla Firefox

A) In FireFox address bar, type “about:config”

Filter: ->
network.dns.disableIPv6 -> true
network.http.pipelining -> true
network.http.pipelining.maxrequests -> 8
network.http.proxy.pipelining -> true

5) How to install/uninstall .deb files

A) To install .deb file

a) sudo dpkg -i package_file.deb

B) To uninstall .deb file

a) sudo dpkg -r package_name

C) To find version of a package installed

a) dpkg -l packagename

D) To convert .rpm files to .deb files

a) sudo alien package_file.rpm

6) How to save “man” outputs into files

A) man ls | col -b > file.txt

7) How to hide GRUB menu on boot-up

A) sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup
B) gksudo gedit /boot/grub/menu.lst

a) Look for ‘#hiddenmenu’
b) Uncomment so it’s ‘hiddenmenu’
c) Save file.

C) To change timeout seconds for GRUP menu on boot-up

a) Look for ‘timeout’ and change value.

D) To change default OS for GRUP menu

a) Look for ‘default’ and add value.

8 ) How to temporary skip boot-up services

A) Press ‘Ctrl + C’

9) If your system is unresponsive, here are some tips to bring it to life

A) Press “ALT” + “sysreq-key” + “one of the keys” listed below (The sysreq-key is also known as the ‘print screen’ key):

‘r’ – Turns off keyboard raw mode and sets it to XLATE.
‘k’ – Secure Access Key (SAK) Kills all programs on the current virtual console.
‘b’ – Will immediately reboot the system without syncing or unmounting your disks.
‘c’ – Will perform a kexec reboot in order to take a crashdump.
‘o’ – Will shut your system off (if configured and supported).
’s’ – Will attempt to sync all mounted filesystems.
‘u’ – Will attempt to remount all mounted filesystems read-only.
‘p’ – Will dump the current registers and flags to your console.
‘t’ – Will dump a list of current tasks and their information to your console.
‘m’ – Will dump current memory info to your console.
‘v’ – Dumps Voyager SMP processor info to your console.
‘0′-’9′ – Sets the console log level, controlling which kernel messages will be printed to your console.
‘f’ – Will call oom_kill to kill a memory hog process
‘e’ – Send a SIGTERM to all processes, except for init.
‘i’ – Send a SIGKILL to all processes, except for init.
‘l’ – Send a SIGKILL to all processes, INCLUDING init.

10) How to install P2P BitTorrent Client (Azureus)

A) sudo aptitude install azureus

a) Applications -> Internet -> Azureus

Source: Ubuntu_Edgy
Categories: linux Tags:

Which *buntu is right for you?

October 27th, 2009 madiga No comments

For those of us who still struggle to know the difference between Ubuntu, Kubuntu and Xubuntu.  This article should shed some light into the fundamental differences and perhaps also lead you to choose the one that best suits your needs.

Ubuntu is a community developed operating system that is perfect for laptops, desktops and servers. Whether you use it at home, at school or at work Ubuntu contains all the applications you’ll ever need, from word processing and email applications, to web server software and programming tools.

Ubuntu is a direct threat and competitor to Windows and Mac operating systems.  Ubuntu is and always will be free of charge. You do not pay any licensing fees. You can download, use and share Ubuntu with your friends, family, school or business for absolutely nothing.

Ubuntu with GNOME


Ubuntu is a community developed, Linux-based operating system that is perfect for laptops, desktops and servers. It contains all the applications you need – a web browser, presentation, document and spreadsheet software, instant messaging and much more.    The default distribution of Ubuntu comes with GNOME desktop environment.

The base of the operating system is all the same but if you like GNOME go for Ubuntu.  The Gnome desktop environment is probably the most widely used world-wide, it is easy, flexible and extremely customizable.  Many use Gnome because of it’s huge community base, easy access to support, custom themes and more.  At the time of this writing, Gnome 2.24 is out.

Kubuntu with KDE

According to the official Kubuntu website, Kubuntu is the first Ubuntu derived distribution.  You can get exactly the same effect by installing Ubuntu and adding the KDE packages (and removing the Gnome packages) from the Ubuntu archives.  Kubuntu uses the KDE graphical environment instead of GNOME.  According to the KDE’s official website, KDE or the K Desktop Environment, is a network transparent contemporary desktop environment for UNIX workstations. KDE seeks to fulfill the need for an easy to use desktop for UNIX workstations, similar to desktop environments found on Macintosh and Microsoft Windows operating systems. The UNIX operating system is according to us the best available today.

KDE is by far the most complete UNIX based desktop environment.  It comes with packages that meets all end user’s needs.  It is extremely user-friendly, has professional interface and in my opinion by should be the default desktop environment for a new user trying to learn Linux.  At the time of this writing, KDE 4.2 is out and it’s awesome!

Xubuntu with XFCE


According to Wikipedia, Xubuntu is an official derivative of the Ubuntu operating system which uses the XFCE desktop environment.  According to the creator of XFCE, Olivier Fourdan…“Xfce is a lightweight desktop environment for various *NIX systems. Designed for productivity, it loads and executes applications fast, while conserving system resources.”  It short, it is a light weight desktop solution compare to Gnome and KDE.  This version can run on older systems, laptops that may not have enough cpu or memory power.

Xfce 4.4, the latest release embodies the traditional UNIX philosophy of modularity and re-usability. It consists of a number of components that together provide the full functionality of the desktop environment. They are packaged separately and you can pick and choose from the available packages to create the best personal working environment

More Ubuntu Derivatives

Edubuntu - Edubuntu’s objective is to create an integrated and usable experience for educational users by enhancing Ubuntu with educational applications, tools, content, and themes.

GobuntuA flavour of Ubuntu that strives to be completely devoid of software, drivers or firmware with restrictive licenses.

Ubuntu Studio - Designed for multimedia editing and creation.  Ubuntu Studio is aimed at the GNU/Linux audio, video and graphic enthusiast as well as professional.

Mythbuntu - Designed for creating a home theatre PC with MythTV.  Mythbuntu is an community supported add-on for Ubuntu focused upon setting up a standalone MythTV based PVR system. It can be used to prepare a standalone system or for integration with an existing MythTV network.  Mythbuntu also uses the XFCE4 desktop.

Ubuntu MID (Mobile Internet Device) Edition – Ubuntu MID Edition targets an exciting new class of computers called Mobile Internet Devices. Ubuntu MID, based on the world’s most popular Linux distribution, and MID hardware from OEMs and ODMs, is redefining what can be done in mobile computing.

Ubuntu is a great and easy to use no matter which of the above derivative you pick.  However, some are meant more for developers and other things that are specific to an industry, such as education.  For a new user, the best options available to use are Ubuntu or Kubuntu.  I personally find the KDE desktop environment more user-friendly than GNOME but everyone has their own preference.

Categories: General Tags: ,

VPNC for Ubuntu!

October 20th, 2009 madiga No comments

People coming from the Windows world are used to using Cisco VPN client to login to their corporate network.  So when they make the transition over to Ubuntu, they’re somewhat puzzled at the complexity of getting Cisco VPN client working.

It’s obviously not as straightforward as it is on Windows platform but there also has been cases of kernel panics using the Cisco VPN client on Linux.

For those who are looking for an alternative, I’ve got good news.  I came across VPNC recently and it only took me a few minutes to get it installed, configured and get connected to my job’s corporate network.

Supported Platforms:

  • Linux (i386/ppc/zaurus tested)
  • NetBSD (i386 tested)
  • FreeBSD (CURRENT of 23.11.2003 tested)
  • OpenBSD (CURRENT of 18.04.2004 tested)
  • DragonFly BSD
  • Darwin / Mac OS X
  • Solaris (7 works, 9 only with –natt-mode forced)
  • Windows / Cygwin

As you can see it supports more than just Linux but I haven’t yet tested on any other in the above list to make sure.

Quick Setup:

$ sudo apt-get install vpnc
Convert your existing PCF file (if you have any) to vpnc recognized format using this perl script: http://svn.unix-ag.uni-kl.de/vpnc/trunk/pcf2vpnc
$ wget http://svn.unix-ag.uni-kl.de/vpnc/trunk/pcf2vpnc
$ chmod +x pfc2vpnc
$ ./pcf2vpnc orig.pcf vpnc.conf
$ sudo vpnc vpnc.conf

That’s it!  Five easy steps to install, configure and connect to your network.  If you have Kubuntu, you can install kvpnc which by default allows you to use the original PCF file for configuration, so no need to convert here.  I haven’t tested this myself so I can’t say for sure it works.

Go ahead, give it a try.  Read the doc that comes with the source pkg to setup a configuration from scratch.

Categories: General Tags: , ,