Dushan888- Technology & FOSS for Humans

Technology & FOSS for Humans!

Posts Tagged ‘cli’

Command Line Package Management [Debian Based]

Posted by Dushi on May 6, 2009

you can use ‘apt-get’ tool to manage packages via the CLI instead of using the GUI. ‘apt-get’ can be used to install and uninstall packages as we needed. For your convenience Im going to introduce another CLI tool , ‘dpkg’. Most of you may already have useded it.

Installing a program:

apt-get install

apt-get install

system will check the repositories and install it into the pc from a desired place. By default it will connect your PC to a FTP server and download the required package and its dependencies, then install. This method is highly effective for a good installation.

If you want to install a package which is already saved in your pc,

dpkg -i

dpkg -i

At times you have to download the package source code/binaries and compile it then install. To do that go in to that folder and follow the following steps,

#./configure
#make
#make install

Uninstalling a program:

same tools again!

dpkg --list

dpkg --list

using the above code you can get a list of installed programs.You can use ‘apt-get’ as shown bellow to remove programs,

apt-get remove

apt-get remove

when after performing an ‘apt-get install’, by experience you ll understand that its installing  also other packages as dependencies. We can also remove a program with all its dependencies.

apt-get --purge

apt-get --purge

these are the basics of Linux file management via CLI. Feel free to experiment the commands and rediscover the CLI.
……………..enjoy…………….

Posted in Computer, Technical | Tagged: , , , , , , | Leave a Comment »

Creating .iso Files

Posted by Dushi on December 16, 2008

Its kind a cool to create .iso images in Linux because it don’t require any special software to do it. All you have to do is to handle some commands in CLI. So put your CD/DVD into the ROM and open up the terminal/konsole. I ll  show 3 methods to do this,

method 0.

              This is my favorite! Follow the code ;)

‘dd’ means disk dump. Actually this has to be ‘convert and copy’, but ‘cc’ is already using in gnu    compiler collection so they are using ‘dd’. ‘if‘ and ‘of‘ stands for input file and output file.This method makes the .iso file at your ‘/home’ directory by its default. I think this is the easiest way to finish the job.

Method 0
Method 0

 

 method 1.

               If your going to use this method first you should have to unmount your optical drive

 

Method

Method

 

method 2.

              mkisofs -o /path_to_.iso_file /path_to_optical_drive

So this is it. There can be many other ways to create .iso files. Thats because GNU/Linux means ‘choice of options’. Enjoy…..! 

 

 

Posted in Computer, Technical | Tagged: , , , , , , | 1 Comment »

Partitioning in Linux [cfdisk]

Posted by Dushi on November 24, 2008

Hi Fellows! My OS[Linux Mint] is near to crash because of my endless, inappropriate experiments. But what to do, My endless curiosity doesn’t leave My OS  alone.

            In this post I m going to demonstrate how to partition a Hard Disk/Flash Drive without any extra tools. All you have to do is to enter some commands in CLI. I’m using My 1GB small old pen drive. And please make sure that you have chose the correct device. Else I don’t have to say what would happen!

            Open the terminal/konsole, then identify your device by giving,

fdisk -l             (I have done this in an early time in detail)

            My device is /dev/sda1.

cfdisk /dev/sda1 (cfdisk is the Curses based disk partition table manipulator for Linux)

then you l end with something like this,

fdisk /dev/sda1

cfdisk /dev/sda1

 In My example I m creating 2 partitions. And one of them is a swap area. Navigate to  New using arrow keys. Press enter. you l end up with the following result,

step2

Creating a New Primary partition

 

 Press Enter.  Then give the Partition size you want.

assigning the size

Assigning The Partition Size

I gave 800MB for My 1st partition. Press Enter.

add partition at beginning of free space

Add Partition at Beginning of Free Space

Select Beginning. It will create the partition at the beginning. Or if you want it at the end select End.As I done the fist partition(sda1p1), I have created another partition named sda1p2.

created two partitions

Two Partitions are Created

With the arrow keys navigate to Type. Then press Enter.

selecting a file system

Selecting a File System

 

 Check this out. you get a big list with a variety of file systems. I want mine as Linux Extended. I went step forward by pressing a key. Then gave the corresponding number for Linux Extended.

entering the filr system type

Entering The Filr System Type

 

 Following the same steps, I set the other partition’s file system as swap. Finally select Write and press Enter.

write partition table to disk
Write Partition Table to Disk

Its good to go! We are done with partitioning. 

…….Later……

 

 

Posted in Computer, Technical | Tagged: , , , , , , , , | 2 Comments »