Sunday 22 September 2013

Swap Space

A lot of you must be confused about what is this swap partition on your disk.And is it being used.
So today Lets learn about the swap space.

Swap space in Linux is used when the amount of physical memory (RAM) is full. If the system needs more memory resources and the RAM is full, inactive pages in memory are moved to the swap space. While swap space can help machines with a small amount of RAM, it should not be considered a replacement for more RAM. Swap space is located on hard drives, which have a slower access time than physical memory.

Swap space can be a dedicated swap partition (recommended), a swap file, or a combination of swap partitions and swap files.
Swap should equal 2x physical RAM for up to 2 GB of physical RAM, and then an additional 1x physical RAM for any amount above 2 GB, but never less than 32 MB.
So, if:
M = Amount of RAM in GB, and S = Amount of swap in GB, then
If M < 2
 S = M *2
Else
 S = M + 2

Shrinking Disk Partition

1.If you want to shrink a disk partition simply go to Disk Management.You can do so by typing "Disk Management" in start up menu or by typing diskmgmt.msc in command prompt.

shrink1b.jpg


2.Right click on the partition you want to shrink and select "Shrink Volume".

3.A pop up window will appear. There you will see the maximum amount you can remove from the existing partition in "Size of available shrink space in MB" option .

shrink3b.jpg

4.In the "Enter the amount of space to shrink in MB" enter the amount of space you want to remove from the existing partition. Click on shrink button.

You will see an unallocated partition created after the previous partition with the size you specified.

Monday 13 May 2013

Creating large file in linux

Use "truncate -s 10M output.file" command. This will create a 10MB file with the name output.file. :))

Or similarly u can use  "dd if=/dev/zero of=myfile bs=1M seek=1500 count=1". 

This will create a 1.5 GB file.

Setting up the default Program To open a file In Ubnuntu 12.04

Hey people......
I know a lot of you must be struggling to set a recently installed software as the default program for running some file type. I also faced a similar problem when i installed okular for viewing pdf as pdf viewer was set as the default program when i installed Ubuntu 12.04 . So Today i am going to tell you

How to set up the default program in Ubuntu 12.04 or greater

 

Step 1. Right click on the file of given type and click on properties.

 

Step 2.Now click on the Open With tab and select the program you want to set as the default.

Step 3. Next click on "Set Default" Button to set the selected program as default.And yayyy u are done with setting up default program.enjoy :))

Setting Up Proxy in Ubuntu

This Post is mainly for the users who have recently shifted to Ubuntu and are struggling to use network which uses proxy.

Steps to set up proxy in Ubuntu system:

1.Press the window button or click on the Ubuntu icon  present on top left corner of the window.

2.Now type network in the box that appears and click on the network icon.


3.Now click on network proxy link.


4.Select manual in the method drop down menu and enter the proxy.


5. Click on apply system wide to use the proxy for all network related tasks in Ubuntu.

And yayyy you are done with setting up proxy for newly installed Ubuntu. Enjoy using It :)

Things to do after installing Ubuntu

Hey friends,
My summer vacations has begun and so it is the time to take back to our own blog "CYBER TRICKS". Today I am going to tell you about some of the coolest softwares you can install once you install Ubuntu.....

1.Cheese:

Well this is the first software i usually install after installing Ubuntu. This software lets you capture your pictures using your laptops web cam. It also provides you with additional facility of video recording and multiple shots.There are also a lot of new additional effects which you can use to make your pix different.

2.Okular:

  

This software lets you edit pdf files easily.It lets you highlight some point, add a note, underline text, write using a pen, draw diagrams, select and copy text and offers many more additional functionalities.I believe it to be the best editor for my pdf files.

3.Screenlets: 


It is another important software that i always require in my Ubuntu.It lets me add notes to my desktop which helps me to remember important stuff easily. Its also involves screen let to monitor my systems performance.There are many other widgets available within this one software.You can always explore them on installing "Screenlets" software.Although i always keep it for STICKY NOTES " :P :D

4.Wally:


Well this is mainly because of my love for beautiful wallpapers on my laptop.I always love to keep my laptop glazing with different and soothing background. And finding the right background image and then trying them one at a time has been a difficult task for me. And nowww this software allows me to manage my desktop background easily. It lets me search my choice specific background on various web sites,define the image size and save those images on my machine.Moreover when kept on play mode the background automatically changes bases on search results every now and then so can I pause it to set the background :D:D

5.Vlc media player:


Of course now who does not like to watch movies. I usually find the default media player quite boring and prefer vlc media player over it. The Large no of shortcuts ,ease of use has always attracted me :)

So People try them out.I hope they ease your work the same way as they do mine.
Any more suggestions comments are always welcome.Do comment. Hoping to talk to you all soon 



Friday 15 February 2013

Cool Linux Tips And Tricks

Ohk everyone
Hope you are liking all the cool Linux stuff that is continuously being posted on the blog.Here are some other cooler Linux Tricks..........

Collaborate with the screen command


Let’s say you and your co-worker are both working on debugging an application and your partner has run into a snag. Instead of having to march back and forth between offices, or leaving the comfort of your own chair (you lazy thing), you can log onto your co-workers machine and collaborate! Here’s how it works. Both machines will be Linux machines and both will have ssh accessibility. If you need to help your co-worker out follow these steps:

    Secure shell into your friends machine…the only catch is, you have to log on with his user name/password.
    Issue the command screen -s NAME Where NAME is any name you want.

Now your co-worker has to open up a terminal window and issue the command screen -x NAME Where NAME is the same name you used in your command. Now whenever either of you type in your screen both of you will see what is going on at the same time.

To detach yourself from this session you have to hit <Ctrl>a and then d. That means hold down <Ctrl>, hit a, and then hit d. You will be released from the session.

Execute files as programs in GNOME


Say you have that killer bash script you use for something tucked away in your home directory. You can run that script by open up a terminal window and issuing the command to run the script, OR…you can set up Nautilus so that files can be run with a simple double click. Now, use caution with this, because it can open up security issues. But if you know you are safe (are you ever really safe?) you can set this feature.

To set this up open up Nautilus to the directory that will house the script and then right-click the script and select Properties. In this new window click on the Permission tab and then check the box for Execute. Close the Properties window and then, back in Nautilus, double click that script and see what happens…it should execute.

Double your copy/paste pleasure


Yes you Read it right. It will be to your surprise that Linux allows you to copy 2 different segments of the text at the same time. This is because Linux have a primary and secondary buffer for copy/paste. You can highlight section A with the left mouse button drag/highlight method and then copy section B with the standard <Ctrl>c method. Now you two different pieces of text to paste – one with the middle mouse button and the other with <Ctrl>v!

Do try them Its fun using them :))

Hack Into Linux Kernal

Following is the procedure to reset root password if you are using GRUB as a boot loader:

   1. Select the kernel

   2. Press the e key to edit the entry

   3. Select second line (the line starting with the word kernel)

    4. Press the e key to edit kernel entry so that you can append single user mode

    5. Append the letter S (or word Single) to the end of the (kernel) line

    6.  Press ENTER key

    7. Now press the b key to boot the Linux kernel into single user mode

    8. At prompt type passwd command to reset password:


You need to mount at least / and other partitions:

# mount -t proc proc /proc

# mount -o remount,rw /


Change the root password, enter:

# passwd


Finally reboot system:

# sync

# reboot


My boot loader is LILO

At LILO boot loader type Linux single and press [ENTER] key:

Boot: Linux single

When you get the # prompt you will need to type passwd root to reset password:

# passwd

Reboot system:

# sync
# reboot

Restore GRUB2 after installing Windows

How I Restored GRUB2 after a Windows 7 Install. GRUB2 (Grand Unified Bootloader)  is a universal bootloader used by Ubuntu and other Linux Distributions. If you have a Linux Distribution installed on a partition, and attempt to  install Windows alongside it, your GRUB bootloader will be overwritten by the Windows bootloader, and your computer will only boot into Windows.



Recovering the GRUB2 Bootloader after a Windows Install  is simple. When finished, your Bootloader should detect all installed Operating Systems and automatically add a bootable menu item for each of them.
Note: This GRUB2 Installation process assumes that a Linux Partition still exists. If you overwrote Linux with Windows, this tutorial will not work for you, as there is no Linux system to recover boot.
How to Restore GRUB2 after installing Windows:
  1. Boot from an Ubuntu Live CD or Live USB
  2. Once up and running, Open a Terminal Open a Terminal
  3. Type sudo su (press enter after typing each command)
  4. Type fdisk -l Type sudo su and then fdisk -l
  5. Note which device contains your Linux partition (IE: /dev/sda1) Locate your Linux Device
  6. Type mount /dev/sdx# /mnt (replacing x# with your actual device and partition number)
  7. Type mount --bind /dev /mnt/dev
  8. Type mount --bind /proc /mnt/proc
  9. Type cp /etc/resolv.conf /mnt/etc/resolv.conf
  10. Type chroot /mnt mount and chroot
  11. Type grub-install --recheck /dev/sdx (replacing x with your actual device)
  12. Type reboot (to reboot your PC) Install grub 2 and reboot
Make sure to remove your Live USB or CD. Upon reboot you should be presented with a GRUB2 menu. However, Windows is missing. Now, I show you how to fix that.
Making GRUB 2 detect Windows Installs:
  1. Proceed to boot into your Linux environment.
  2. Open a terminal and type sudo update-grub (enter your root password when prompted) sudo update-grub
If all went well, grub should have updated it’s menu entries to reflect what it detected. Including existing Windows partitions.