Change GRUB timeout and default option on Ubuntu 12.10

If you use one PC with Ubuntu and other OS, sometimes maybe we need to change timeout of the GRUB before load OS or order of all OS. I will show you how to do that on Ubuntu 12.10
Open terminal /shortcut Ctrl+Alt+T/.
In terminal enter

gksudo gedit /etc/default/grub

Enter your password and you will see grub file in gedit editor.It will be something like that

GRUB_DEFAULT=4
#GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=30
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""
  • GRUB_DEFAULT – default is 0 it corresponding to the first value in the grub menu loader. So for second option is 1, third is 2 and etc. In my case Windows 7 is 5 option in grub menu so I set GRUB_DEFAULT=4
  • GRUB_TIMEOUT – this is the option how many seconds to wait before start loading the selected option. Default value is 10, as you can see upper I change it to 30 seconds.

When you finish with editing save the document and close it. In the terminal enter this command to apply changes that you made.

sudo update-grub

Reboot and you should see your default and timeout options change.

Posted in Linux, Ubuntu at April 16th, 2013. No Comments.

Install APC on Ubuntu 11.04

Installation of APC on Ubuntu 11.04 is simple, only requires two terminal commands:

sudo apt-get install php-apc
sudo /etc/init.d/apache2 restart

After restart create one php file.

<?php
echo phpinfo();
?>

Check for the apc module.
Good luck.

Posted in Apache, Php, Ubuntu at December 14th, 2011. 1 Comment.

Where is the Apache error log on Ubuntu?

The Apache log is in /var/log/apache2/error.log
If you type in console:

tail -f /var/log/apache2/error.log

This is the way to see all the error while the page is loading.

Posted in Apache, Ubuntu at December 11th, 2011. No Comments.

Maintaining Apache2 sites

Today I will introduction you how to configuring sites in Ubuntu’s Apache 2 package, how easily to add and remove sites. The main source of confusiong comes from the various directories stored beneath /etc/apache2:

sites-available directory:
A list of configuration files – one per site. The system admin can have as many sites here as they need – however – they will not all be active.
sites-enabled directory:
A list of symlinks to configuration files in sites-available. The sites listed here are the sites which will be active.
a2ensite
Will create the correct symlinks in sites-enabled to allow the site configured in sitefilename to be served
a2dissite
Will remove the symlinks from sites-enabled so that the site configured in sitefilename will not be served

Now let’s do it in practice:

Now go to this folder: /etc/apache2/sites-available/ and execute this command:

sudo nano example

In the editor enter this options for your site:


ServerName example.local
ServerAlias *.example.local
DocumentRoot /home/nikola/example.local

Create the folder example.local in your home folder. I prefer to use .local for the name of the folder to remind me this is web site folder. Also this is the extension will be used to make difference between real site and your local site, when you watched it in the browser.

Now execute this command:

sudo nano /etc/hosts

and enter this:
127.0.0.1 example.local

and save the file.Now you must create symlinks in sites-enabled to allow the site. Go to directory /etc/apache2/sites-enabled/ and execute:

sudo a2ensite example

and now restart apache server

sudo /etc/init.d/apache2 restart

If you want to disable example.local site, execute this:

sudo a2dissite example
sudo /etc/init.d/apache2 restart

Go to browser and type example.local.
That’s all, good luck.

Posted in Apache, Ubuntu at December 5th, 2011. No Comments.

How to start stop restart Apache web server in Ubuntu

Hello, today I will show you how to start/stop/restart your Apache server. First you need to use sudo command restart Apache.
To start apache use this command:

sudo /etc/init.d/apache2 start

To stop apache use this command:

sudo /etc/init.d/apache2 stop

To restart apache use this command:

sudo /etc/init.d/apache2 restart

That’s all, good luck.

Posted in Apache, Ubuntu at December 2nd, 2011. No Comments.

Install OpenSSH client and server on Ubuntu 11.04

Installation of the OpenSSH client and server applications for Ubuntu 11.04 is simple. To install the OpenSSH client applications on your Ubuntu system, open terminal (Ctrl+Alt+T) and enter this command for client application:

sudo apt-get install openssh-client

And this one for server application

sudo apt-get install openssh-server

If you want to connect via client application type this command in the terminal:

ssh username@hostname

Good luck!

Posted in Linux, Ubuntu at November 11th, 2011. No Comments.

How To Change Password On Ubuntu

Hello,

today I will show you how you can change password on Ubuntu. There is two ways to do that:
1) From command line
2) From GUI

1) Change Ubuntu user password from command line

To change your password from command line, you must use command passwd
See the example below:

nikola@nikola-XPS-M1530:~$ passwd
Changing password for nikola.
(current) UNIX password:
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully

In this example I change my password.

2) Change Ubuntu user password from GUI
To change your password from GUI follow this step:
Click on System -> Preferences -> About Me
In the right upper corner, there is button change password. Click on it and fill up the “Change password” window.

That’s all.Good luck

Posted in Linux, Ubuntu at October 27th, 2011. No Comments.

How to Add New Keyboard Layout in Ubuntu

This article will show you how to change the keyboard layout in Ubuntu 11.04, but this should work on any distribution that has Gnome set as the desktop environment.
So here there are 5 things you must do:

  1. Go to System -> Preferences -> Keyboard.
  2. In the new open window /Keyboard Preferences/, select the “Layouts” tab.
  3. Click “Add” and select your keyboard layout by country or by language.
  4. Look at the virtual keyboard and see if it matches your keyboard’s layout.
  5. When you find the layout you need, click “Add”.

And that’s all..

Posted in Ubuntu at August 30th, 2011. No Comments.