Category Archives: Linux

free ebooks, linux ebooks, open source os ebooks, free unix ebooks

How to check error log in Apache/LAMP?

First login to your server using ssh

A. ssh
B. Enter proper password

Then switch back to the root and use this command.

Benefit of “-f” option is as you hit your php page in browser terminal will auto refresh errors and you can see most recent errors.

Your Path may be diffrent! I have different sub domains parked in my server. So this is my error log path in LAMP.

Hope it will work for you.


Shell Script in 5 minutes!

Shell scripts are short programs that are written in a shell programming language and interpreted by a shell process. They are extremely useful for automating tasks on Linux and other Unix-like operating systems.

1. Here is very short tutorials to make a very basic shell scripting.
. open vi or any other advance editor like vim

2. Save this script and give a name for example “phpmind.txt”
3. phpmind will be your command.
4. To run your command type ./phpmind
5. If its says Permission denied then use chmod 755 phpmind
6. Now the script is ready to run by typing the following, again while in the same directory, and then pressing the ENTER key:
./ phpmind

How It Works

The first of the three lines tells the operating system what shell to use to interpret the script and the location (i.e., absolute pathname) of the shell. The shell is bash, which is located in the /bin directory (as are all shells); thus the line contains /bin/bash. This instruction is always preceded by a pound sign and an exclamation mark in order to inform the operating system that it is providing the name and location of the shell (or other scripting language).
The second line tells the shell to issue the clear command. pwd (which shows the current directory),
The third line tells the shell to write the phrase Good morning, world. on the screen. It uses the echo command, which instructs the shell to repeat whatever follows it.


Linux Beginner Practice using command line tool.

PhpMind Linux Practice Command line.

LAMP is growing very fast from small business to Enterprise level.
Every one is looking for LAMP developers.  Most of them are very good in PHP and MYSQL but in Interview Interviewer stat asking about Apache and Linux questions they keep  mum!!

This is for php beginners those who want to learn Linux and don’t have command line facility to practice.  Its easy like  1 2 3 !!

1. Open this link  – Linux Practice for beginners.

2. Open terminal –

3. Start working.


Linux faqs

How to find out which Linux version you are running?
# cat /proc/version

Output – Linux version ( (gcc version 3.4.6 20060404 (Red Hat 3.4.6-10)) #1 SMP Thu Nov 13 15:27:29 MST 2008

how do I show all installed packages in Linux?
# rpm -qa | less
This workes in Red Hat/Fedora Core/CentOS Linux


Why you should use Linux?

  • Unlike many single user desktop console based operating systems, Linux is a multi-user, multi-tasking, network enabled operating system accessible from anywhere on the network.
  • Multiple users can access a Linux computer remotely, each running their own individual desktop instance, all at the same time.
  • The Linux/Unix X-Windows network enabled multi-user windowing system allows full remote access.

    This is a sharp contrast to a single user console based OS which requires the user to be physically present at the computer in order to access his desktop and applications, limiting access to one user at a time.

  • The Linux/Unix OS was designed to support remote and secure multi-user access using ssh.
  • This gives all Linux/Unix administrators and users a powerful flexible standard remote interface while the automobile is often the primary remote access tool of other OS administrators (i.e. Windows 98 and NT).
  • Linux/Unix shell scripts provide a batch scripting capability which can be scheduled, propagated to other systems.
  • Future and advanced development is ensured as the source code is available to all. It is studied in universities and institutions worldwide.
  • PhD candidates and corporate researchers use Linux to try advanced computing concepts.
  • Linux is here to stay; it is getting stronger day by day, and that is good from a technical, financial and economic point of view.