Dushan888- Technology & FOSS for Humans

Technology & FOSS for Humans!

Posts Tagged ‘command line’

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 »

Formating Pens & Other External Storage Media in GNU/Linux.

Posted by Dushi on November 25, 2008

I thought to write this post in a hurry. Because I realized this topic is a common question among New GNU/Linux users and who converted to Linux from windows. Ya its reasonable for windows guys because they perform that task so easily just, right clicking on the device. Its cheap huh?

            I can see my 1GB good old pen is resting on my front USB port!Sorry Pen your going to get formatted. Please make sure, you have selected the correct device by running fdisk -l (I have don this before in detail. New readers, please check my ‘awesome CLI‘ posts.) in your terminal/konsole. mm.. well mine is /dev/sda1 .

            Now get into root mode by giving su or sudo su. Then follow my example. And make sure the device is not mounted.

mkfs.vfat /dev/sda1

mkfs.vfat /dev/sda1

I have turned my good old pen into a FAT file system. File system depends on users choice. If I want it in ext3 Itl appear like this,

mkfs.ext3 /dev/sda1 

This is how we does. This is how GNU/Linux does. Smart huh!

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 »