Showing posts with label Ubuntu. Show all posts
Showing posts with label Ubuntu. Show all posts

Monday, January 26, 2015

How to clear cache memory in Ubuntu

Since my Ubuntu 14.04 was storing a lot of cache in memory (as far as I remember it was 1.5 GB, or maybe more than that), I was looking for a solution. For those computers having a limited memory below 4 GB and used heavily, caching a lot may cause trouble. Though it becomes more faster, but for me it made my computer ran slowly.

I was looking for a permanent solution. Then I made a script which will make a soft link indicating itself and will drop cache. No need to write "sudo sync; sudo echo 3 > /proc/sys/vm/drop_caches" every time in terminal, which I found complex to memorize.

Below script will download an script, save it in '/usr/local/share/' directory and then execute it. Actually the downloaded script will make a soft link in '/usr/local/bin/' directory to make it more easier and interactive. It can be deployed in any machine which supports BASH such as UNIX or Linux. Additionally the machine must be connected to the internet as it downloads original script from github.

Copy and paste it into terminal


Original source code is available in my github account:
https://github.com/Nabid/Shell_Scripts/tree/master/Drop_Cache

Tested in Ubuntu 14.14 Trusty Tahr.



The scripts in this post and in the github link given above, can be used, modified or changed for only educational purposes. The author is not responsible for any kind of damage or data loss.

Friday, September 19, 2014

Install Bangla Fonts in Linux based OS

To install bangla fonts in any Linux based operating system, select the script below, paste into terminal and press enter:

The followed bangla fonts will be installed:
  • Kalpurush
  • BanSen
  • BanSenHandWriting
  • Lohit
  • SolaimanLipi
  • AdorshoLipi
  • Bangla
  • SutonnyMJ
File size: 1.1 MB
Tested in Ubuntu 14.04

Monday, April 21, 2014

Mount a ntfs partion in Ubuntu, Linux

Generally no file can be executed at a pendrive or at a separate partition in Linux, unless it is mounted with proper permissions. The default mount (clicking on a pendrive or partition mounts automatically) does not provide necessary permission due to security issue.
This problem can be override by the following commands.

  1. First we need to find out our media to be mounted.
    fdisk -l
    This command gives a list of devices currently connected. Prompting this command at my terminal gives output:
    Disk /dev/sda: 500.1 GB, 500107862016 bytes
    255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
    Disk identifier: 0xfa61dadb
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *   376006656   976773119   300383232    7  HPFS/NTFS/exFAT
    /dev/sda2            2046   376006655   188002305    5  Extended
    Partition 2 does not start on physical sector boundary.
    /dev/sda5            2048   360380415   180189184   83  Linux
    /dev/sda6       360382464   376006655     7812096   82  Linux swap / Solaris
    
    Partition table entries are not in disk order
    
    Suppose we are going to mount /dev/sda1.

  2. Now we have to define a mount point where that partition is going to be mounted. I will mount it into /media/Partition directory. The following command will create that directory.
    mkdir -p /media/Partition

  3. Finally, the following command will mount our partition.
    sudo mount -t ntfs -o nls=utf8,umask=000 /dev/sda1 /media/Partition
    We are mounting ntfs type partition or device, full list of supported type can be found at manual page of "mount" command. Umask = 000 means it allows read, write and execute permission for all (security risk).
Thats it. We have just mounted an ntfs file system into readable, writable, and executable mode.

Sunday, April 20, 2014

Software list for my new Ubuntu 14.04 Trusty Tahr

Just finished installation of Ubuntu 14.04 in my laptop, making only OS of my computer system. I think I'll make a review later, but right now I'll make a list of new softwares I am installing now.
  • VIM
  • VLC Player
  • Codeblocks
  • Terminator - a command interpreter
  • Ubuntu Restricted Extras
  • Google Chrome - my secondary browser
  • Oracke JDK
  • Xampp
  • Php-Storm
  • Eclipse
  • Android Studio
  • Avro
  • Shutter - Screen Capture
  • Gimp - Image Editor
  • qBitTorrent
  • Dropbox
  • Google Drive Ocamlfuse - Google Drive Client for Linux [Currently using Grive]
  • Grive (Google drive client)
  • Okular (Document Viewer, Specially for PDF)
  • todo-indicator (task manager)
  • Texmaker (LaTex Editor)
  • Weka (Data Analysis Tool)

Monday, January 13, 2014

Installing JDK, JRE in Ubuntu

Installation of "default-jdk" using "apt-get" was perfect though in my system it was showing that OpenJdk 6 was installed. I did not wanted it and deleted it from Software Manager. Unfortunately, uninstalling OpenJdk 6 installs OpenJdk 7!!!
I was searching for a solution on the web. Then I found the following link. It describes how to install Oracle Jre and Jdk. This link is so helpful.

http://www.wikihow.com/Install-Oracle-Java-JDK-on-Ubuntu-Linux

Friday, December 20, 2013

Roadway to Ubuntu

This post is neither a solution nor a suggestion. This is what I experienced during installation of ubuntu in my system.
    Since the first day I used a computer, I was using MS Windows as default and primary operating system. Though, its important for a student to cope with different operating systems. During this time, I have used different Unix/Linux based live OS. Deciding which OS I should use is pretty tough decision because there are bunch of choices and all of those are free. :P
    My first attempt to install Linux was on a AMD A55 machine. It was a failure because of hardware configuration. ( I have tried it with both 32bit and 64bit different OSs. )
Then I got my laptop, an Intel system with pre-installed Windows 7 in it. Well, I removed it with Windows 8 from DreamSpark account at 0.00$ cost. :D Living together with Windows 8 was quiet fun. xD However, when I took Operating System course at University, it was a necessity having a Linux OS in my system. But, I failed again. Ubuntu live OS ran fine, installation started every time, but it could not modify the karnel about installation! I tried with Fedora, OpenSuse, Ubuntu, BackTrack and LinuxMint. Each time it started fine, but ends with error. Error! Error!! Error!!! ( Now I have figured it why.. Windows hibernate/hybrid-shutdown option was not allowing any other OS to modify the storage. Later I turned it off using the following command. )
powercfg /h off
    Enough installing Linux for me! So, I kept it cool with Windows.
Meanwhile, my pc was attacked by SIREFEF virus. It turned off, turned off(!) Windows Defender permanently and converted system directories into junctions. Thats why I could not turn Windows Defender on. It ate all the website certificates on all browses. Whenever I turned on the pc, a VB script was creating executable file and some null processes on background. I got rid off this virus using HitmanPro.
    Another thing this virus did was making disk partitions undetectable in disk management tool or windows setup. So, I was thinking on a new set up. Why not Linux now? Yes, it was time for Ubuntu to take all the disk spaces. :D This time I was stuck with, UEFI abd Legacy Mode. Certainly I wanted Ubuntu in UEFI mode but did not find any option for Windows but Legacy mode. Oh, I surely wanted a duel boot.
    I created partitions, installed Ubuntu. Then another problem did arise! Windows could not format GPT partitions. I erased the whole disk using diskpart.
diskpart
list disk
select disk *
clean
convert gpt
exit
    Well, windows was installed. Finally, I installed Ubuntu by formatting unallocated spaces. Installation Finish! Restart!! Windows Boot!!!
    Ah, the MBR, windows boot manager. Again I inserted Ubuntu live USB to install GRUB.
sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt-get update
sudo apt-get install -y boot-repair
sudo boot-repair
    At last... Got my dual boot system with Ubuntu 12.04.2 and Windows 8. Decided to use Ubuntu as primary and Windows as supporting OS.
Finally, Enjoying Ubuntu!!
Thanks - Jajabor, 2014