Sunday, October 6, 2013

How to set background image in grub - Ubuntu

Its very easy to set background image for grub in Ubuntu. Follow these steps

1. sudo apt-get install grub2-splashimages
After installation in directory /usr/share/images/grub you can find images for grub.
2. Open /etc/default/grub file and add line
GRUB_BACKGROUND="/usr/share/images/grub/image"
3. sudo update-grub

After rebooting you will see grub background.

Saturday, October 5, 2013

Ubuntu. Why grub don't loading?

Sometimes, actually when you have only Ubuntu installed on your computer, grub don't loading, that is when you turn on the computer, some time later loads ubuntu without showing grub. Issue can be resolve by boot-repair.

1. Add repository for boot-repair installing
sudo add-apt-repository ppa:yannubuntu/boot-repair

2. Update apt-get
sudo apt-get update

3. Install boot-repair
sudo apt-get install boot-repair

4. Run boot-repair

After these steps issue must dissapear.

Wednesday, June 19, 2013

How to set static IP linux

1. Open /etc/network/interfaces

there will be written something like this
auto lo
iface lo inet loopback
 
Change text like this

auto lo eth0
iface lo inet loopback
iface eth0 inet static
        address xxx.xxx.xxx.xxx(this is your ip)
        netmask xxx.xxx.xxx.xxx(this is your mask)
        gateway xxx.xxx.xxx.xxx(this is your gateway)

Compres/Extract archives in linux

1. Compress/Extract tar archive in linux
Compress tar -cvf name.tar /path
Extract tar -xvf name.tar

2. Compress/Extract tar.bz2 archive in linux
Compress tar cjf name.tar.bz2 /path
Extract tar -xvjf name.tar.bz2

3. Compress tar.gz archive in linux
Compress tar -pczf name.tar.gz /path
Extract tar -xzvf name.tar.gz

4. Compress tar.xz archive in linux
Compress tar cJf name.tar.xz /path
Extract tar -xf name.tar.xz

5. Compress tar.7z archive in linux
Compress tar cf - /path | 7zr a -si name.tar.7z
Extract 7zr x name.tar.7z

6. Compress .7z archive in linux
Compress 7zr a -t7z name.7z /path
Extract 7zr x name.7z

Tuesday, June 11, 2013

Linux startup messages

For change pre-login message Linux you must edit file /etc/issue
For change post-login message Linux you must edit file /etc/motd

Also you must to edit file /etc/login.defs, uncomment lines MOTD_FILE and ISSUE_FILE

Where is located start up directory

All start up services located in /etc/init.d

How to add start up service linux gentoo

All start up services located in /etc/init.d
You can create executable file in /etc/init.d, for example execute.sh after that run this command
rc-update add execute.sh

If you want to delete any service from start up, you must run command

rc-update delete some-service

And finally you can see all services

rc-update show