Showing posts with label AtheOS. Show all posts
Showing posts with label AtheOS. Show all posts

Sunday, 2 October 2011

Setup and Start VNC service on Linux
Add a user for VNC
[root@]# useradd -c "VNC USER" -m vnc
Modify vncservers file to start vncserver for user vnc
[root@]# vi /etc/sysconfig/vncservers
[root@]# grep ^VNC /etc/sysconfig/vncservers
VNCSERVERS="2:vnc"
VNCSERVERARGS[2]="-geometry 800x600  -nohttpd"
[root@]#
Set VNC display password using vncpasswd command
[root@]# su - vnc
[vnc@]$ vncpasswd
Password:
[vnc@]$exit
[root@]#
Start VNC server
[root@]#service vncserver start

Set up to start VNC service on startup
[root@]# chkconfig --list vncserver
vncserver       0:off   1:off   2:off   3:off   4:off   5:off   6:off
[root@]# chkconfig --levels 345 vncserver on
[root@]# chkconfig --list vncserver
vncserver       0:off   1:off   2:off   3:on    4:on    5:on    6:off
[root@]#
Download a VNC Viewer on your laptop/pc
Apache With SSL Support
Requirement
#httpd
#openssl
#mod_ssl
#crypto-utils (genkey) -

##Install mod_ssl , crypto-utils

/etc/http/conf.d/ssl.conf


Users & Groups

useradd     default DB contains HomeDirectory and Shell Directory

 /etc/passwd


usermod   default encypted DB  /etc/shabow
      9 fields in shadow to control user

passwd & shadow combines to form a user profile.

groupadd   Adds group to sysem
 groupadd ITMIS

groupmod   modify group
 man groupmod
 add user to Group #
            usermod -G ITMIS

#gshadow
# groups list groups on system

There are two types of groups exist.
 1.primary          -G
 2. supplementory  -g

userdel & groupdel  to delete

..............................
/etc/login.defs
...............

Apache Server Installation and configurations



look if apache is installed

1.   rpm -qa | grep httpd

2.  rpm  -ql httpd-mannual

3  /etc/httpd
    /etc/httpd/conf
    /etc/http/conf.d


4. Apache startup
   httpd -> httpd.conf  & conf.d/*.conf
 

5. Apache logs
   /var/log/httpd
  /etc/httpd/logs


6. hostname -f

7. htdbm , htdigest , htpasswd ( Used to Password protect)

8. modules extend the capability of kernel. apache has modular structure

#$lsmod

9.  /var/www/
  html , cgi-bin , error , manual , icons ,usage




10. suexec " it runs cgi scripts" it is used by        apache.

11. virtual host
   
12. Listen 80 " Means When Apache starts it will bind to port 80"
 when Apache runs it temporarly run as root

13. Apache Model
    httpd(core key capabilities ) -> modules
      > grep Loadmodule httpd
 
11.  less /etc/passwd
       grep -i nologin /etc/passwd
       deamon users.
     
12. Document root "/var/www/html/"
      BUT It can be customized by changing as         below

    DocumentRoot "/var/www/testalias1"

13.  .htaccess

14. less /etc/mime type " Just Info "

15. Apache start

16. Alias " Allows us to map URLs to Physical Location

Alias /testalias/  "/var/www/testalias1 "
       testalis folder contains a file index.html.

user url  http://localhost/testalias/


17.  Directory Directive.
     
            Directory directive can accept many options to instruct Apache.
             Symlink should be created in document root ..... Use Alias directive

18 . Create Symbolic Link.
         ln -s ../testalias1/ testsymlink1.


19.Open Ports using  #system-config-securitylevel-gui/tui


20.  .htaccess file.
      
       #


21. Virtual Hosts.

      Allows apache to host multiple websites.

<VirtualHost>

</VirtualHost>

two types of virtual hosts, ip based and name based

IP Based Virtual Host

<VirtualHost 172.21.100.115:80 >
       ServerAdmin root@172.21.100.115
       DocumentRoot /var/www/ipbased_test
       ServerName abc.sngpl.com.pk
       DirctoryIndex xyz.html abc.html
       ErrorLog logs/ipbased_test.error.log
       CustomLog logs/ipbased_test.log combined
     
</VirtualHost>


Name Based Virtual Host



Virtual Hosts - IP-Based & Name Based



ApAche Basic Authentication


Apache DigestAuth

Guide to X-terminal setup

How to install LAMP (Apache, PHP and MySQL in Linux) using Yum



       Many friends ask me how to install LAMP (Linux, apache, php, mysql). There are many ways to install LAMP. Here i teach you the most easiest way to install LAMP using yum program in CentOS.

Below are the steps to install LAMP (Apache, PHP and MySQL in Linux) using Yum:-

1.    Go to CentOS and download a copy of CentOS Linux and install it (i’ll not go thru the how to install CentOS with you here)
2.     Once your CentOS is installed. Open a terminal (if you are using X-Window), and type yum install httpd and follow on screen instruction to install apache web server
3.     Once apache web server has been installed, type yum install php
4.    Once PHP installed successfully, type yum install mysql-server mysql
5.    Once everything finish, type service httpd start to start your apache web server, screen will show you if web server service successfully started
6.    type service mysqld start to start your mysql server
7.    Once both services is running, you can point your browser to http://localhost and you should see a welcome page from CentOS
8.    If you see that welcome page, you just installed everything successfull.
9.    To test if php is running, go to /var/www/html and create an index.php file with the content below           
and refresh your browser again. If you see a purple PHP information page showing all the php        configuration variables, then php is running now.
10. Congratulation, you just successfully installed LAMP in your machine.
How to auto start Apache during boot time – Linux
If you compile your own apache from source, your apache will not auto start during boot time. To enable auto start apache during boot time, you need to do some configuration on rc.d directory.
Follow the steps below and apache will auto start during boot time:-

  • Go to init.d folder
#cd /etc/rc.d/init.d
  • Create httpd file
#vi httpd
  • Copy and paste the code below and save the file (content below is for user who install their apache at /usr/local/apache):-
#!/bin/sh
#
# Startup script for the Apache Web Server
#
# chkconfig: 345 85 15
# description: Apache is a World Wide Web server. It is used to serve \
# HTML files and CGI.
# processname: /usr/local/apache/bin/httpd
# pidfile: /usr/local/apache/logs/httpd.pid
# config: /usr/local/apache/conf/httpd.conf
# Source function library.
. /etc/rc.d/init.d/functions
# See how we were called.
case “$1″ in
start)
echo -n “Starting httpd: ”
daemon /usr/local/apache/bin/httpd -DSSL
echo
touch /var/lock/subsys/httpd
;;
stop)
echo -n “Shutting down http: ”
killproc httpd
echo
rm -f /var/lock/subsys/httpd
rm -f /var/run/httpd.pid
;;
status)
status httpd
;;
restart)
$0 stop
$0 start
;;
reload)
echo -n “Reloading httpd: ”
killproc httpd -HUP
echo
;;
*)
echo “Usage: $0 {start|stop|restart|reload|status}”
exit 1
esac
exit 0
  • allow apache start up script to be executable
#chmod 744 httpd
  • Now you need to test if this apache start up script is good, type
./httpd start
in your shell to run the apache start up script
  • If you can execute this apache start up script with no error then you can continue with the next steps.
  • Create a symbolic link at /etc/rc.d/rc3.d folder with name S80httpd that link to /etc/rc.d/init.d/httpd
#cd /etc/rc.d/rc3.d
#ln -s ../init.d/httpd S80httpd
  • Your server now is ready to start apache during boot time. Please reboot your server to take immediate effect.
  • To check if apache will start up during boot time, type
#ps ax | grep httpd
at your shell right after you login with a new reboot, if it shows httpd process then you have configured your apache to start during boot time correctly.

How to create symbolic link in Unix
Symbolic link in *nix is just like a shortcut in Window. You can create a shortcut for script or directory.     
You can delete symbolic link anytime and it wont affect your link directory or files.
To create symbolic link is very easy, it’s just a line of command to create symbolic link in *nix. We use ln command to create symbolic link. Below are the explanation on how to use ln command
#ln -s [PATH_TO_SCRIPT] ./[SHORTCUT_NAME]
So for example, if I want to create a symbolic link “apachelogs” at myfolder to point to /usr/local/apache/logs folder then i’ll use the command below:-
ln -s /usr/local/apache/logs /home/myfolder/apachelogs
So you can try to create your own symbolic link now

Nagios Installation and Configuration

Getting Nagios
You need root access on the server, where you would like to install Nagios. Login as root.
Create a directory for downloads.
#mkdir -p /usr/src/backs/nagios
#cd /usr/src/backs/nagios
Download source of nagios and nagios-plugins at http://www.nagios.org/download/.
#wget http://keihanna.dl.sourceforge.net/sourceforge
/nagios/nagios-1.2.tar.gz

#wget http://easynews.dl.sourceforge.net/sourceforge
/nagiosplug/nagios-plugins-1.3.1.tar.gz

Compilation and installation of Nagios

Login as root and create a user, say “nagios”
#su
#adduser nagios
#passwd nagios
Changing password for user nagios.
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
In some servers normal users may not have permission to use ‘mail’ inorder to send alerts.
usermod -G mail nagios
Make a directory for working with the source code.
mkdir -p /usr/src/works/nagios
cd /usr/src/works/nagios/
tar -zxvf /usr/src/backs/nagios/nagios-1.2.tar.gz
cd nagios-1.2/
 ./configure

The default is fine for normal operation.
for details see the file 'INSTALL'.

./configure --prefix=prefix --with-cgiurl=cgiurl
--with-htmurl=htmurl --with-nagios-user=someuser
--with-nagios-grp=somegroup

./configure
make all
make install
make install-init # Needed to add the service 'nagios'.
make install-commandmode
make install-config
Install the plugins
cd ../
tar -zxvf /usr/src/backs/nagios/nagios-plugins-1.3.1.tar.gz
cd nagios-plugins-1.3.1/
./configure

NOTE:- For mysql and postgresql plugins to work,
their  libraries have to be installed. so to avoid
installing those we will use 'check_tcp'
Instead later with seperate port for mysql and postgresql.

make
make check
make install
Libraries will be installed in ‘/usr/local/nagios/libexec’ position by the default installation.
If there is no contents do the following.
 mkdir /usr/local/nagios/libexec
 mv /usr/lib/nagios/plugins/* /usr/local/nagios/libexec/
 ln -s /lib/libcrypto.so.0.9.7a /lib/libcrypto.so.4

Post install Configuration of Nagios

Edit apache’s httpd.conf file. (the location of the httpd.conf file may differ)
vim /etc/httpd/conf/httpd.conf
Add the following line at the end of the file.
Include /etc/httpd/conf/nagios.conf
Create the file ‘/etc/httpd/conf/nagios.conf’.
vi /etc/httpd/conf/nagios.conf
Add the following contents to this file.
————————————————-
ScriptAlias /nagios/cgi-bin/ /usr/local/nagios/sbin/

AllowOverride AuthConfig
Options ExecCGI
Allow from all
Order allow,deny
Alias /nagios/ /usr/local/nagios/share/

Options None
AllowOverride AuthConfig
Order allow,deny
Allow from all
————————————————–
Make sure the updations done with http is fine and restart apache.
#service httpd restart
Create ‘.htaccess’ file in ‘/usr/local/nagios/share/’ and ‘/usr/local/nagios/sbin/’.
#touch /usr/local/nagios/share/.htaccess
#touch /usr/local/nagios/sbin/.htaccess
Add the following contents to both these files.
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
require valid-user
Create the username, password for logging into the Nagios interface.
htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
ls -l /usr/local/nagios/etc/htpasswd.users
Make it available for the user who runs httpd.
chmod o+r /usr/local/nagios/etc/htpasswd.users
Restart the httpd service.
service httpd restart

Advanced Nagios Configurations.

Rename the sample files to the real names.
cd /usr/local/nagios/etc/
for i in *sample ; do mv $i `echo "$i" |sed s/-sample//` ; done
Edit the main conf file, nagios.cfg. and change only these lines.
check_external_commands=1
Make these Cgi specific changes in cgi.cfg.
use_authentication=1
authorized_for_system_information=nagiosadmin
authorized_for_configuration_information=nagiosadmin
authorized_for_system_commands=nagiosadmin
authorized_for_all_services=nagiosadmin
authorized_for_all_hosts=nagiosadmin
authorized_for_all_service_commands=nagiosadmin
authorized_for_all_host_commands=nagiosadmin

Add servers that need to be monitored

Make the Host specific changes to the hosts.cfg.
 Generic host definition template
define host{
        name                            generic-host
        notifications_enabled          1
        event_handler_enabled          1
        flap_detection_enabled          1
        process_perf_data              1
        retain_status_information      1
        retain_nonstatus_information    1

        register                        0
        }

define host{
        use                    generic-host            ; Name of host
template to use

        host_name              
        alias                  
        address                
        check_command          check-host-alive
        max_check_attempts      10
        notification_interval  120
        notification_period    24x7
        notification_options    d,u,r
        }
Repeat for all the hosts we want to check.
Group them in hostgroups.cfg
define hostgroup{
        hostgroup_name  
        alias          
        contact_groups  
        members        <,,..>
}
Repeat for all the hosts groups.

Specify the services that need to be checked

Edit the details of all the services, we want checked by Nagios in services.cfg.
 Generic service definition template
define service{
        name                            generic-service
        active_checks_enabled          1
        passive_checks_enabled          1
        parallelize_check              1
        obsess_over_service            1
        check_freshness                0
        notifications_enabled          1
        event_handler_enabled          1
        flap_detection_enabled          1
        process_perf_data              1
        retain_status_information      1
        retain_nonstatus_information    1
        register                        0
        }

define service{
        use                            generic-service
        host_name                      
        service_description            
        is_volatile                    0
        check_period                    24x7
        max_check_attempts              3
        normal_check_interval          3
        retry_check_interval            1
        contact_groups                  
to send>
        notification_interval          120
        notification_period            24x7
        notification_options            w,u,c,r
        check_command                  
        }
Repeat for each service on each host.

Specify Alert Contacts

In order to specify details of the contacts for alerts, we need to edit contacts.cfg.
 'nagios' contact definition
define contact{
        contact_name                    
        alias                          
        service_notification_period    24x7
        host_notification_period        24x7
        service_notification_options    w,u,c,r
        host_notification_options      d,u,r
        service_notification_commands  notify-by-email,notify-by-epager
        host_notification_commands
host-notify-by-email,host-notify-by-epager
        email                          
        pager                          
        }
Repeat for all contacts.

Group the contacts

Edit contactgroups.cfg, in order to specify groups of contacts.
define contactgroup{
        contactgroup_name      
        alias                  
        members                
        }
Repeat for all groups to include all contacts

Escalation with nagios

If you need to send selective alerts, for example when critical issues occur, simply configure the escalations.cfg file.
define serviceescalation{
        host_name                      
        service_description            < name>
        first_notification              2
        last_notification              6
        contact_groups                  < groups (comma seperated)>
        notification_interval          0
        }
Repeat for all escalations Once again, check all the files, nagios.cfg cgi.cfg hosts.cfg hostgroups.cfg, services.cfg, contacts.cfg, contactgroups.cfg, escalations.cfg and checkcommands.cfg Restart httpd and then Nagios.
service httpd restart
Add Nagios to system services.
chkconfig --add nagios
service nagios restart
Check for any errors reported, and solve them one by one if any.
Enable nagios in runlevels, so that it starts on boot.
chkconfig nagios on
Create cron.daily entry if we want to restart the service daily. Here is the script.
vi etc/cron.daily/nagios-restart.cron
#!/bin/sh
/sbin/service nagios restart >/dev/null 2>&1
Make it executable
chmod +x etc/cron.daily/nagios-restart.cron
And finally, Check if nagios is working fine.!!! ;-)
http://NAGIOS-SERVER-NAME/nagios/index.html
How to change hostname in Linux
If you are new to linux you probably will ask how to change the hostname of you computer. (A hostname is the unique name by which a network attached device is known on a network.) If you enter the wrong hostname during the installation, and you need to change the hostname, here is the solution:-
•           Edit file /etc/sysconfig/network using your favourite editor. In my case is nano. So i’ll enter nano /etc/sysconfig/network
•           Look for HOSTNAME=xxxxxx
•           Change the xxxx to the name you wish to set for your computer. (ex: HOSTNAME=techiecorner.com)
•           Save the file and restart the xinetd service. (ex: type service xinetd restart in your shell)
•           Done! You have just changed your hostname in Linux platform
The future of IT will be reduced to three kinds of jobs
There’s a general anxiety that has settled over much of the IT profession in recent years. It’s a stark contrast to the situation just over a decade ago. At the end of the 1990s, IT pros were the belles of the ball. The IT labor shortage regularly made headlines and IT pros were able to command excellent salaries by getting training and certification, job hopping, and, in many cases, being the only qualified candidate for a key position in a thinly-stretched job market. At the time, IT was held up as one of the professions of the future, where more and more of the best jobs would be migrating as computer-automated processes replaced manual ones.
Unfortunately, that idea of the future has disappeared, or at least morphed into something much different.

The glory days when IT pros could name their ticket evaporated when the Y2K crisis passed and then the dot com implosion happened. Suddenly, companies didn’t need as many coders on staff. Suddenly, there were a lot fewer startups buying servers and hiring sysadmins to run them.
Around the same time, there was also a general backlash against IT in corporate America. Many companies had been throwing nearly-endless amounts of money at IT projects in the belief that tech was the answer to all problems. Because IT had driven major productivity improvements during the 1990s, a lot of companies over-invested in IT and tried to take it too far too fast. As a result, there were a lot of very large, very expensive IT projects that crashed and burned.
When the recession of 2001 hit, these massively overbuilt IT departments were huge targets for budget cuts and many of them got hit hard. As the recession dragged out in 2002 and 2003, IT pros mostly told each other that they needed to ride out the storm and that things would bounce back. But, a strange thing happened. IT budgets remained flat year after year. The rebound never happened.
Fast forward to 2011. Most IT departments are a shadow of their former selves. They’ve drastically reduced the number of tech support professionals, or outsourced the help desk entirely. They have a lot fewer administrators running around to manage the network and the servers, or they’ve outsourced much of the data center altogether. These were the jobs that were at the center of the IT pro boom in 1999. Today, they haven’t totally disappeared, but there certainly isn’t a shortage of available workers or a high demand for those skill sets.
That’s because the IT environment has changed dramatically. More and more of traditional software has moved to the web, or at least to internal servers and served through a web browser. Many technophobic Baby Boomers have left the workforce and been replaced by Millennials who not only don’t need as much tech support, but often want to choose their own equipment and view the IT department as an obstacle to productivity. In other words, today’s users don’t need as much help as they used to. Cynical IT pros will argue this until they are blue in the face, but it’s true. Most workers have now been using technology for a decade or more and have become more proficient than they were a decade ago. Plus, the software itself has gotten better. It’s still horribly imperfect, but it’s better.
So where does that leave today’s IT professionals? Where will the IT jobs of the future be?


1. Consultants

Let’s face it, all but the largest enterprises would prefer to not to have any IT professionals on staff, or at least as few as possible. It’s nothing personal against geeks, it’s just that IT pros are expensive and when IT departments get too big and centralized they tend to become experts at saying, “No.” They block more progress than they enable. As a result, we’re going to see most of traditional IT administration and support functions outsourced to third-party consultants. This includes a wide range from huge multi-national consultancies to the one person consultancy who serves as the rented IT department for local SMBs. I’m also lumping in companies like IBM, HP, Amazon AWS, and Rackspace, who will rent out both data center capacity and IT professionals to help deploy, manage, and troubleshoot solutions. Many of the IT administrators and support professionals who currently work directly for corporations will transition to working for big vendors or consultancies in the future as companies switch to purchasing IT services on an as-needed basis in order to lower costs, get a higher level of expertise, and get 24/7/365 coverage.

2. Project managers

Most of the IT workers that survive and remain as employees in traditional companies will be project managers. They will not be part of a centralized IT department, but will be spread out in the various business units and departments. They will be business analysts who will help the company leaders and managers make good technology decisions. They will gather business requirements and communicate with stakeholders about the technology solutions they need, and will also be proactive in looking for new technologies that can transform the business. These project managers will also serve as the company’s point of contact with technology vendors and consultants. If you look closely, you can already see a lot of current IT managers morphing in this direction.

3. Developers

By far, the area where the largest number of IT jobs is going to move is into developer, programmer, and coder jobs. While IT used to be about managing and deploying hardware and software, it’s going to increasingly be about web-based applications that will be expected to work smoothly, be self-evident, and require very little training or intervention from tech support. The other piece of the pie will be mobile applications — both native apps and mobile web apps. As I wrote in my article, We’re entering the decade of the developer, the current changes in IT are “shifting more of the power in the tech industry away from those who deploy and support apps to those who build them.” This trend is already underway and it’s only going to accelerate over the next decade.

Use Windows 7 System Image Recovery to restore a hard disk

Have you used Microsoft Windows 7’s Backup and Restore to create a system image of your hard disk? If so, do you update it on a regular basis? If you do, then you are prepared for a problem that leaves your hard disk in an unrepairable predicament, such as the one that I described in my recent blog post “Access More Troubleshooting Tools with Windows 7 System Recovery Options.” This is the predicament where the Startup Repair Tool can’t repair the problem and you then access the System Recovery Options menu, as shown in Figure A, which provides you with a set of tools that can help you revive your system. If for some reason neither Startup Repair nor System Restore is able to get you back up and running, you can use the System Image Recovery option to revive an unbootable system.

Figure A

The System Recovery Options menu displays a list of system recovery tools that you can use to repair startup problems, run diagnostics, or restore your system.
While knowing that you have a system image provides you with a certain level of comfort, using it is another story. The reason being that the only time you’ll ever get to see what a System Image Recovery operation looks like is when you need to perform one. And, chances are that you’ll be pretty stressed at that point and won’t really want any more uncertainty in your life. With that in mind, in this edition of the Windows Desktop Report, I’ll show you how to use System Image Recovery. That way, if the time comes when you need to use it, you’ll know exactly what to expect.


Caveat

A system image includes the operating system and all your system settings, your programs, and all your files. However, keep in mind that when you restore your computer from a system image, it will actually perform a complete restoration of your entire system, which means that all your current programs, system settings, and files will be replaced with the versions that were current when you made the system image.

Getting started

To begin, make sure that you have your system image available — if you created an image on optical discs, have the last disc in the set inserted into the drive or if you created an image on an external hard drive, have the drive connected to your system. For my example, I created an image on an external hard drive. Then, access the System Recovery Option menu. To recap, there are several ways that you can get there:
  • If your system will still attempt to start Windows, then you can attempt to access the System Recovery Options from your hard disk.
  • If Windows won’t start at all, you can access the System Recovery Options by booting from the Windows 7 DVD.
  • If you have created a System Repair Disc, you can boot from that disk as well and access the System Recovery Options.
For more details, see the Getting to the System Recovery Options section of the “Access More Troubleshooting Tools with Windows 7 System Recovery Options” blog post.

The restore procedure

When you select the System Image Recovery option, the procedure will immediately locate the most recent system image connected to your system and display that information in the first screen of the Re-Image Your Computer wizard, as shown in Figure B. As you can see, my system image is on drive F, the drive letter assigned to my external hard drive, it was created on 7/19 at 4:51 AM, and it is the image for the computer named Greg-PC.

Figure B

The System Image Recovery procedure will immediately locate the most recent system image connected to your system.
Just for the sake of thoroughness, if the System Image Recovery procedure cannot locate a recent system image, you will see a warning message, like the one shown in Figure C, that prompts you to connect the external drive or insert the last optical disc in the set into the optical drive and click Retry. If your system image is on a network drive, you can click Cancel and follow the prompts to connect to a network location and manually select your system image.

Figure C

If the System Image Recovery procedure cannot locate a recent system image, you’ll see this warning message.
Returning to our example, just click Next. You’ll then see the second screen of the Re-Image Your Computer wizard, as shown in Figure D. As you can see, this screen provides you with several options. If you are restoring to the same hard disk, you don’t need to select the Format and Repartition Disks check box. If you are restoring to a new hard disk, chances are that the Format and Repartition Disks check box will be selected by default and will be unavailable. If that is the case, there is nothing to worry about as long as the new hard disk is of the same capacity or greater than the old one.

Figure D

The second screen in the Re-Image Your Computer wizard provides you with a number of options to choose from.
Since there are no other drives in my example, the Exclude Disks button is unavailable. If you have multiple drives you can click the Exclude Disks button and choose the drive you want to restore. If none of the options are available on this screen, you may have to install drivers for the disks you are restoring by clicking the Install Drivers button. However, since Windows 7 has such great built-in driver support, that is unlikely.
Now, if you click the Advanced button, you’ll see the dialog box shown in Figure E. The Automatically Restart check box will be selected by default, and you’ll have the option to enable a disk check operation as a part of the procedure.

Figure E

If you click the Advanced button, you can enable a disk check operation.
When you click Next, you’ll see the confirmation screen of the Re-Image Your Computer wizard, as shown in Figure F. To continue, just click Finish.

Figure F

To complete the Re-Image Your Computer wizard, just click Finish.
Of course, there is one more confirmation to work through, as shown in Figure G. Just click Yes to get started.

Figure G

Just click Yes in the final confirmation dialog box.
In a moment, the restore operation will begin. As the restore operation progresses, you’ll see the progress bar, as shown in Figure H. Depending on how big your hard disk is, the restore operation can take a few hours. Now that the restore is under way, it might be a good idea to step away for a while. Go get a cup of coffee or watch some TV. When it is done, your system will restart and you’ll see the familiar logon screen.

Figure H

As the restore operation progresses, you’ll see the progress; however, chances are that it will take a few hours to complete.

What’s your take?

Now that you know how a System Image Recovery procedure works, you will be prepared if the time comes when you are forced to restore your computer. If you have performed a System Image Recovery procedure before, what was your experience?

OS Downloads

Downloads

Name Download
AdaOS None
AROS http://www.aros.org/download.php
AtheOS http://www.atheos.cx/download/list.php3
BSD None
Cefarix http://sourceforge.net/projects/cefarix
Chaos http://chaosdev.org/index.pl?chaos/Download
CP/M http://www.seasip.demon.co.uk/Cpm/software/index.html
Darwin http://www.opensource.apple.com/projects/darwin/release.html
DCP http://www.kc85.de/downloads.html
Debian GNU/Hurd http://www.debian.org/ports/hurd/hurd-cd
E.R.I.K.A http://erika.sssup.it/download.shtml
eCos http://ecos.sourceware.org/getstart.html
ELKS http://elks.sourceforge.net/download/
ERaMS http://erams.sourceforge.net/distrib.
EROS http://www.eros-os.org/project/build.html
Fiasco http://os.inf.tu-dresden.de/fiasco/download.html
Free-VMS ftp://freevms.nvg.org/pub/vms/freevms
FreeBSD http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/mirrors.html
FreeDOS http://www.freedos.org/freedos/files/
Freedows None
Linux http://www.linux.org
Menuet http://www.menuetos.org/download.htm
Minix http://www.cs.vu.nl/pub/minix/
MorphOS http://www.morphos.de/fileslinks.php3
NetBSD http://www.netbsd.org/Releases/
Oberon http://www.oberon.ethz.ch/native/
OpenBEOS http://sourceforge.net/projects/crux/
OpenBSD http://www.openbsd.org/ftp.html
Plan 9 http://plan9.bell-labs.com/plan9dist/download.html
PowerOS http://www.poweros.de/download.html
QNX http://get.qnx.com
ReactOS http://www.reactos.com/index.php?tab=software§ion=reactos
RTEMS http://www.rtems.com/RTEMS/Source/source.html
S.Ha.R.K http://shark.sssup.it/download.html
SkyOS http://www.skyos.org/downloads/
Solaris 8 http://www.sun.com/solaris/binaries/get.html
Unununium None
V2_OS http://www.v2os.cx/
VSTa http://vsta.sourceforge.net/
Winmac http://sourceforge.net/projects/winmac
xMach http://sourceforge.net/projects/xmach/
Yamit http://yamit.sourceforge.net/download.html
ZotOS http://members.tripod.com/~zot_os/public_html/download.html

Operating systems

Operating systems

OS License Platform Developement Status
AdaOS GPL/LGPL/GFDL i386 Early stages
AROS AROS PUBLIC LICENSE x86, Amiga, m68 Slow but Active.
AtheOS GPL x86 This OS is being actively developed. Support Intel, AMD and other compatible processors.
BSD BSD - See OpenBSD/FreeBSD/NetBSD for development status.
Cefarix GPL i386 The Project is inactive
Chaos BSD x86 Since chaos is fairly new, the hardware support is rather limited.Not much documentation.
CP/M Freeware 68000, 8086 No development seems to be happening here. Caldera currently holds the rights to this OS. They have released the original source code but not under the GPL. Source code is available for CP/M 2 and 3 for the PCW16.
Darwin Apple Public Source PowerPC Quite active. Apple is working hard here and is also giving back a lot of code to the open source community. Support for the Intel platform is also planned.
DCP Unknown x86 Development was discontinued in the early 90s.
Debian GNU/Hurd GNU GPL x86 Actively developed. Debian GNU/Hurd is not officially released yet, and won't be for some time.
E.R.I.K.A GPL x86 Not very active.
eCos GNU GPL ARM, Hitachi H8300, Intel x86, MIPS, Matsushita AM3x, Motorola 68k, PowerPC, SuperH, SPARC and NEC V8xx Very active.
ELKS GNU GPL 8086, 80286 Not very active.
ERaMS GPL x86 Not very active
EROS GNU GPL Intel 486 and higher Code is complete, not very active.
Fiasco GPL x86 Quite an active development project.
Free-VMS GNU GPL x86 Development is slow.
FreeBSD BSD x86, DEC Alpha, IA-64, PC-98 and UltraSPARC It works on a wide platform and it is under active development and support.
FreeBSD BSD x86, DEC Alpha, IA-64, PC-98 and UltraSPARC It works on a wide platform and it is under active development and support.
FreeDOS GNU GPL Intel Very active. The site is up to date. Not as bad as most of the other free operating systems that seem to have sunk into oblivion. Still does not have multitasking, protected mode. Works under DosEmu.
Freedows GNU GPL Intel The project is almost dead. No development has happened recently.
Linux GPL Intel, Alpha, SPARC, PowerPC Very active. Some big names are behind it so expect a lot from this OS.
Menuet GPL x86 Not very Active
Minix BSD Intel Minix is upto V2.0 but the page was last updated in 1996.
MorphOS Open Source Amiga The first release has been sent to some selected developers for evaluation on their hardware. There is a lot of expectation from this OS.
NetBSD BSD alpha, amiga, arc, arm26, arm32, atari, bebox, cobalt, hp300, hpcmips, i386, luna68k, mac68k, macppc, mipsco, mvme68k, news68k, newsmips, next68k, ofppc, pc532, pmax, prep, sgimips, sh3, sparc, sparc64, sun3, vax, x68k This is definitely an active project. New work is being done all the time and all documentation and FAQs are current. Release schedules are quite slow though.
NetBSD BSD alpha, amiga, arc, arm26, arm32, atari, bebox, cobalt, hp300, hpcmips, i386, luna68k, mac68k, macppc, mipsco, mvme68k, news68k, newsmips, next68k, ofppc, pc532, pmax, prep, sgimips, sh3, sparc, sparc64, sun3, vax, x68k This is definitely an active project. New work is being done all the time and all documentation and FAQs are current. Release schedules are quite slow though.
Oberon General ETH Oberon S x86, Alpha The project is very active.
OpenBEOS aq.php?list=all&prog x86 This is the unofficial release ofter the original BEOS company got acquired. This is actively developed by fan followers.
OpenBSD BSD Alpha, Amiga, HP300, i386, mac68k, mvme68k, pmax, powerpc,SPARC, sun3,vax Active development with developers all round the world. The project is always on the lookout for more resources and help so see if you can get in and help them out.
OpenBSD BSD Alpha, Amiga, HP300, i386, mac68k, mvme68k, pmax, powerpc,SPARC, sun3,vax Active development with developers all round the world. The project is always on the lookout for more resources and help so see if you can get in and help them out.
Plan 9 Plan 9 Intel, Mips, DEC Alpha, and Power PC This OS was recently released to the open source community but it seems to have been a bit too late. There has not been much interest in this promising OS.
PowerOS Open Source PowerPC PowerOS is currently under development. Not very active
QNX QNX Open Community x86 This was originally a commercial project. Definitely very well supported and very actively developed.
ReactOS GNU Copyleft Intel Actively developed.
RTEMS Open Source Motorola PowerPC, M683x0, M680x0, Coldfire; Intel ix86, i960; MIPS R46x SPARC; Hitachi SH; AMD 29K; HP PA-RISC Very active. Beta 4.5.0 was released on 23 May 2000. There is also a active development community behind this.
S.Ha.R.K GPL x86 This project is very active.
SkyOS freeware
Version 5.0 is now available for distribution to beta testers. Users may download previous versions for free.
Solaris 8 Solaris 8 BCL Intel, Sparc This is a very mature project. Actively developed and supported.
Unununium BSD i386 This is being actively developed.
V2_OS GNU GPL Intel i386 Quite an active project and some good code has come out of it too.
VSTa Copylefted i386, Amiga 68030 Not very actively developed.
Winmac GPL Intel No files have been released as yet.
xMach LGPL x86 There is a small developer team here and they're actively looking for more coders.
xMach LGPL x86 There is a small developer team here and they're actively looking for more coders.
Yamit BSD
Early releases of the microkernel are available for download.
ZotOS
x86 Not very active

Linux Basic Commands

Command
Description
apropos whatis
Show commands pertinent to string. See also threadsafe
man -t ascii | ps2pdf - > ascii.pdf
make a pdf of a manual page
which command
Show full path name of command
time command
See how long a command takes
time cat
Start stopwatch. Ctrl-d to stop. See also sw
dir navigation

cd -
Go to previous directory
cd
Go to $HOME directory
(cd dir && command)
Go to dir, execute command and return to current dir
pushd .
Put current dir on stack so you can popd back to it
file searching

alias l='ls -l --color=auto'
quick dir listing
ls -lrt
List files by date. See also newest and find_mm_yyyy
ls /usr/bin | pr -T9 -W$COLUMNS
Print in 9 columns to width of terminal
find -name '*.[ch]' | xargs grep -E 'expr'
Search 'expr' in this dir and below. See also findrepo
find -type f -print0 | xargs -r0 grep -F 'example'
Search all regular files for 'example' in this dir and below
find -maxdepth 1 -type f | xargs grep -F 'example'
Search all regular files for 'example' in this dir
find -maxdepth 1 -type d | while read dir; do echo $dir; echo cmd2; done
Process each item with multiple commands (in while loop)
find -type f ! -perm -444
Find files not readable by all (useful for web site)
find -type d ! -perm -111
Find dirs not accessible by all (useful for web site)
locate -r 'file[^/]*\.txt'
Search cached index for names. This re is like glob *file*.txt
look reference
Quickly search (sorted) dictionary for prefix
grep --color reference /usr/share/dict/words
Highlight occurances of regular expression in dictionary
archives and compression

gpg -c file
Encrypt file
gpg file.gpg
Decrypt file
tar -c dir/ | bzip2 > dir.tar.bz2
Make compressed archive of dir/
bzip2 -dc dir.tar.bz2 | tar -x
Extract archive (use gzip instead of bzip2 for tar.gz files)
tar -c dir/ | gzip | gpg -c | ssh user@remote 'dd of=dir.tar.gz.gpg'
Make encrypted archive of dir/ on remote machine
find dir/ -name '*.txt' | tar -c --files-from=- | bzip2 > dir_txt.tar.bz2
Make archive of subset of dir/ and below
find dir/ -name '*.txt' | xargs cp -a --target-directory=dir_txt/ --parents
Make copy of subset of dir/ and below
( tar -c /dir/to/copy ) | ( cd /where/to/ && tar -x -p )
Copy (with permissions) copy/ dir to /where/to/ dir
( cd /dir/to/copy && tar -c . ) | ( cd /where/to/ && tar -x -p )
Copy (with permissions) contents of copy/ dir to /where/to/
( tar -c /dir/to/copy ) | ssh -C user@remote 'cd /where/to/ && tar -x -p'
Copy (with permissions) copy/ dir to remote:/where/to/ dir
dd bs=1M if=/dev/sda | gzip | ssh user@remote 'dd of=sda.gz'
Backup harddisk to remote machine
rsync (Network efficient file copier: Use the --dry-run option for testing)

rsync -P rsync://rsync.server.com/path/to/file file
Only get diffs. Do multiple times for troublesome downloads
rsync --bwlimit=1000 fromfile tofile
Locally copy with rate limit. It's like nice for I/O
rsync -az -e ssh --delete ~/public_html/ remote.com:'~/public_html'
Mirror web site (using compression and encryption)
rsync -auz -e ssh remote:/dir/ . && rsync -auz -e ssh . remote:/dir/
Synchronize current directory with remote one
ssh (Secure SHell)

ssh $USER@$HOST command
Run command on $HOST as $USER (default command=shell)
ssh -f -Y $USER@$HOSTNAME xeyes
Run GUI command on $HOSTNAME as $USER
scp -p -r $USER@$HOST: file dir/
Copy with permissions to $USER's home directory on $HOST
scp -c arcfour $USER@$LANHOST: bigfile
Use faster crypto for local LAN. This might saturate GigE
ssh -g -L 8080:localhost:80 root@$HOST
Forward connections to $HOSTNAME:8080 out to $HOST:80
ssh -R 1434:imap:143 root@$HOST
Forward connections from $HOST:1434 in to imap:143
ssh-copy-id $USER@$HOST
Install public key for $USER@$HOST for password-less log in
wget (multi purpose download tool)

(cd dir/ && wget -nd -pHEKk http://www.pixelbeat.org/cmdline.html)
Store local browsable version of a page to the current dir
wget -c http://www.example.com/large.file
Continue downloading a partially downloaded file
wget -r -nd -np -l1 -A '*.jpg' http://www.example.com/dir/
Download a set of files to the current directory
wget ftp://remote/file[1-9].iso/
FTP supports globbing directly
wget -q -O- http://www.pixelbeat.org/timeline.html | grep 'a href' | head
Process output directly
echo 'wget url' | at 01:00
Download url at 1AM to current dir
wget --limit-rate=20k url
Do a low priority download (limit to 20KB/s in this case)
wget -nv --spider --force-html -i bookmarks.html
Check links in a file
wget --mirror http://www.example.com/
Efficiently update a local copy of a site (handy from cron)
networking (Note ifconfig, route, mii-tool, nslookup commands are obsolete)

ethtool eth0
Show status of ethernet interface eth0
ethtool --change eth0 autoneg off speed 100 duplex full
Manually set ethernet interface speed
iwconfig eth1
Show status of wireless interface eth1
iwconfig eth1 rate 1Mb/s fixed
Manually set wireless interface speed
iwlist scan
List wireless networks in range
ip link show
List network interfaces
ip link set dev eth0 name wan
Rename interface eth0 to wan
ip link set dev eth0 up
Bring interface eth0 up (or down)
ip addr show
List addresses for interfaces
ip addr add 1.2.3.4/24 brd + dev eth0
Add (or del) ip and mask (255.255.255.0)
ip route show
List routing table
ip route add default via 1.2.3.254
Set default gateway to 1.2.3.254
host pixelbeat.org
Lookup DNS ip address for name or vice versa
hostname -i
Lookup local ip address (equivalent to host `hostname`)
whois pixelbeat.org
Lookup whois info for hostname or ip address
netstat -tupl
List internet services on a system
netstat -tup
List active connections to/from system
windows networking (Note samba is the package that provides all this windows specific networking support)

smbtree
Find windows machines. See also findsmb
nmblookup -A 1.2.3.4
Find the windows (netbios) name associated with ip address
smbclient -L windows_box
List shares on windows machine or samba server
mount -t smbfs -o fmask=666,guest //windows_box/share /mnt/share
Mount a windows share
echo 'message' | smbclient -M windows_box
Send popup to windows machine (off by default in XP sp2)
text manipulation (Note sed uses stdin and stdout. Newer versions support inplace editing with the -i option)

sed 's/string1/string2/g'
Replace string1 with string2
sed 's/\(.*\)1/\12/g'
Modify anystring1 to anystring2
sed '/ *#/d; /^ *$/d'
Remove comments and blank lines
sed ':a; /\\$/N; s/\\\n//; ta'
Concatenate lines with trailing \
sed 's/[ \t]*$//'
Remove trailing spaces from lines
sed 's/\([`"$\]\)/\\\1/g'
Escape shell metacharacters active within double quotes
seq 10 | sed "s/^/ /; s/ *\(.\{7,\}\)/\1/"
Right align numbers
sed -n '1000{p;q}'
Print 1000th line
sed -n '10,20p;20q'
Print lines 10 to 20
sed -n 's/.*<\/title>.*/\1/ip;T;q'
Extract title from HTML web page
sed -i 42d ~/.ssh/known_hosts
Delete a particular line
sort -t. -k1,1n -k2,2n -k3,3n -k4,4n
Sort IPV4 ip addresses
echo 'Test' | tr '[:lower:]' '[:upper:]'
Case conversion
tr -dc '[:print:]' < /dev/urandom
Filter non printable characters
tr -s '[:blank:]' '\t'
cut fields separated by blanks
history | wc -l
Count lines
set operations (Note you can export LANG=C for speed. Also these assume no duplicate lines within a file)

sort file1 file2 | uniq
Union of unsorted files
sort file1 file2 | uniq -d
Intersection of unsorted files
sort file1 file1 file2 | uniq -u
Difference of unsorted files
sort file1 file2 | uniq -u
Symmetric Difference of unsorted files
join -t'\0' -a1 -a2 file1 file2
Union of sorted files
join -t'\0' file1 file2
Intersection of sorted files
join -t'\0' -v2 file1 file2
Difference of sorted files
join -t'\0' -v1 -v2 file1 file2
Symmetric Difference of sorted files
math

echo '(1 + sqrt(5))/2' | bc -l
Quick math (Calculate φ). See also bc
seq -f '4/%g' 1 2 99999 | paste -sd-+ | bc -l
Calculate π the unix way
echo 'pad=20; min=64; (100*10^6)/((pad+min)*8)' | bc
More complex (int) e.g. This shows max FastE packet rate
echo 'pad=20; min=64; print (100E6)/((pad+min)*8)' | python
Python handles scientific notation
echo 'pad=20; plot [64:1518] (100*10**6)/((pad+x)*8)' | gnuplot -persist
Plot FastE packet rate vs packet size
echo 'obase=16; ibase=10; 64206' | bc
Base conversion (decimal to hexadecimal)
echo $((0x2dec))
Base conversion (hex to dec) ((shell arithmetic expansion))
units -t '100m/9.58s' 'miles/hour'
Unit conversion (metric to imperial)
units -t '500GB' 'GiB'
Unit conversion (SI to IEC prefixes)
units -t '1 googol'
Definition lookup
seq 100 | (tr '\n' +; echo 0) | bc
Add a column of numbers. See also add and funcpy
calendar

cal -3
Display a calendar
cal 9 1752
Display a calendar for a particular month year
date -d fri
What date is it this friday. See also day
[ $(date -d '12:00 +1 day' +%d) = '01' ] || exit
exit a script unless it's the last day of the month
date --date='25 Dec' +%A
What day does xmas fall on, this year
date --date='@2147483647'
Convert seconds since the epoch (1970-01-01 UTC) to date
TZ='America/Los_Angeles' date
What time is it on west coast of US (use tzselect to find TZ)
date --date='TZ="America/Los_Angeles" 09:00 next Fri'
What's the local time for 9AM next Friday on west coast US
locales

printf "%'d\n" 1234
Print number with thousands grouping appropriate to locale
BLOCK_SIZE=\'1 ls -l
Use locale thousands grouping in ls. See also l
echo "I live in `locale territory`"
Extract info from locale database
LANG=en_IE.utf8 locale int_prefix
Lookup locale info for specific country. See also ccodes
locale -kc $(locale | sed -n 's/\(LC_.\{4,\}\)=.*/\1/p') | less
List fields available in locale database
recode (Obsoletes iconv, dos2unix, unix2dos)

recode -l | less
Show available conversions (aliases on each line)
recode windows-1252.. file_to_change.txt
Windows "ansi" to local charset (auto does CRLF conversion)
recode utf-8/CRLF.. file_to_change.txt
Windows utf8 to local charset
recode iso-8859-15..utf8 file_to_change.txt
Latin9 (western europe) to utf8
recode ../b64 < file.txt > file.b64
Base64 encode
recode /qp.. < file.qp > file.txt
Quoted printable decode
recode ..HTML < file.txt > file.html
Text to HTML
recode -lf windows-1252 | grep euro
Lookup table of characters
echo -n 0x80 | recode latin-9/x1..dump
Show what a code represents in latin-9 charmap
echo -n 0x20AC | recode ucs-2/x2..latin-9/x
Show latin-9 encoding
echo -n 0x20AC | recode ucs-2/x2..utf-8/x
Show utf-8 encoding
CDs

gzip < /dev/cdrom > cdrom.iso.gz
Save copy of data cdrom
mkisofs -V LABEL -r dir | gzip > cdrom.iso.gz
Create cdrom image from contents of dir
mount -o loop cdrom.iso /mnt/dir
Mount the cdrom image at /mnt/dir (read only)
cdrecord -v dev=/dev/cdrom blank=fast
Clear a CDRW
gzip -dc cdrom.iso.gz | cdrecord -v dev=/dev/cdrom -
Burn cdrom image (use dev=ATAPI -scanbus to confirm dev)
cdparanoia -B
Rip audio tracks from CD to wav files in current dir
cdrecord -v dev=/dev/cdrom -audio -pad *.wav
Make audio CD from all wavs in current dir (see also cdrdao)
oggenc --tracknum='track' track.cdda.wav -o 'track.ogg'
Make ogg file from wav file
disk space (See also FSlint)

ls -lSr
Show files by size, biggest last
du -s * | sort -k1,1rn | head
Show top disk users in current dir. See also dutop
du -hs /home/* | sort -k1,1h
Sort paths by easy to interpret disk usage
df -h
Show free space on mounted filesystems
df -i
Show free inodes on mounted filesystems
fdisk -l
Show disks partitions sizes and types (run as root)
rpm -q -a --qf '%10{SIZE}\t%{NAME}\n' | sort -k1,1n
List all packages by installed size (Bytes) on rpm distros
dpkg-query -W -f='${Installed-Size;10}\t${Package}\n' | sort -k1,1n
List all packages by installed size (KBytes) on deb distros
dd bs=1 seek=2TB if=/dev/null of=ext3.test
Create a large test file (taking no space). See also truncate
> file
truncate data of file or create an empty file
monitoring/debugging

tail -f /var/log/messages
Monitor messages in a log file
strace -c ls >/dev/null
Summarise/profile system calls made by command
strace -f -e open ls >/dev/null
List system calls made by command
strace -f -e trace=write -e write=1,2 ls >/dev/null
Monitor what's written to stdout and stderr
ltrace -f -e getenv ls >/dev/null
List library calls made by command
lsof -p $$
List paths that process id has open
lsof ~
List processes that have specified path open
tcpdump not port 22
Show network traffic except ssh. See also tcpdump_not_me
ps -e -o pid,args --forest
List processes in a hierarchy
ps -e -o pcpu,cpu,nice,state,cputime,args --sort pcpu | sed '/^ 0.0 /d'
List processes by % cpu usage
ps -e -orss=,args= | sort -b -k1,1n | pr -TW$COLUMNS
List processes by mem (KB) usage. See also ps_mem.py
ps -C firefox-bin -L -o pid,tid,pcpu,state
List all threads for a particular process
ps -p 1,$$ -o etime=
List elapsed wall time for particular process IDs
last reboot
Show system reboot history
free -m
Show amount of (remaining) RAM (-m displays in MB)
watch -n.1 'cat /proc/interrupts'
Watch changeable data continuously
udevadm monitor
Monitor udev events to help configure rules
system information (see also sysinfo) ('#' means root access is required)

uname -a
Show kernel version and system architecture
head -n1 /etc/issue
Show name and version of distribution
cat /proc/partitions
Show all partitions registered on the system
grep MemTotal /proc/meminfo
Show RAM total seen by the system
grep "model name" /proc/cpuinfo
Show CPU(s) info
lspci -tv
Show PCI info
lsusb -tv
Show USB info
mount | column -t
List mounted filesystems on the system (and align output)
grep -F capacity: /proc/acpi/battery/BAT0/info
Show state of cells in laptop battery
dmidecode -q | less
Display SMBIOS/DMI information
smartctl -A /dev/sda | grep Power_On_Hours
How long has this disk (system) been powered on in total
hdparm -i /dev/sda
Show info about disk sda
hdparm -tT /dev/sda
Do a read speed test on disk sda
badblocks -s /dev/sda
Test for unreadable blocks on disk sda
interactive (see also linux keyboard shortcuts)

readline
Line editor used by bash, python, bc, gnuplot, ...
screen
Virtual terminals with detach capability, ...
mc
Powerful file manager that can browse rpm, tar, ftp, ssh, ...
gnuplot
Interactive/scriptable graphing
links
Web browser
xdg-open .
open a file or url with the registered desktop application