10 Basic Linux Commands That Work On Debian Lenny PART3

By | January 12, 2011

Debian lenny is my most favorite linux distribution ever. I know people in India like RedHat and Ubuntu but Debian has always been my pick. Here are 10 more basic linux commands that works perfectly fine on debian lenny. And by the way, you should check out my part1 and part2 series of basic linux commands before you can proceed with this version. The list starts from 21 and ends with 30.

21: gzip – This command is also used to compress and decompress the files in linux opetating system.

linux@india365:~/work/test1$ ls -lrth
total 1.3M
-rw-r–r– 1 linux linux 1.3M 2011-01-13 11:47 test
linux@india365:~/work/test1$ gzip test
linux@india365:~/work/test1$ ls -lrth
total 4.0K
-rw-r–r– 1 linux linux 2.6K 2011-01-13 11:47 test.gz

22: gunzip – This command is used to compress and decompress the files.

linux@india365:~/work/test1$ ls -lrth
total 4.0K
-rw-r–r– 1 linux linux 2.6K 2011-01-13 11:47 test.gz
linux@india365:~/work/test1$ gunzip test.gz
linux@india365:~/work/test1$ ls -lrth
total 1.3M
-rw-r–r– 1 linux linux 1.3M 2011-01-13 11:47 test

23: hdparm – hdparm check the disk utilization of the system hard disk.

linux@india365:~/work/test1$ sudo hdparm -t /dev/sda

/dev/sda:
Timing buffered disk reads: 82 MB in 3.07 seconds = 26.72 MB/sec

24: hostname – shows the hostname os the system you are currently working on.

linux@india365:~/work/test1$ hostname
india365

25: ifconfig – Displays the ipaddress along with the ethernet ports that are available on the system.

linux@india365:~/work/test1$ sudo ifconfig
eth0 Link encap:Ethernet HWaddr 00:0c:29:5d:f1:74
inet addr:192.168.236.130 Bcast:192.168.236.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe5d:f174/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:53 errors:0 dropped:0 overruns:0 frame:0
TX packets:102 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:9329 (9.1 KiB) TX bytes:15490 (15.1 KiB)
Interrupt:19 Base address:0x2000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:560 (560.0 B) TX bytes:560 (560.0 B)

26: join – Combines two files and displays the output on the terminal.

linux@india365:~/work$ cat hello1
Hello there
linux@india365:~/work$ cat hello2
Hello this is vamsi
linux@india365:~/work$ join hello1 hello2
Hello there this is vamsi

27: kill – Kill command kills a currently running process.

kill processid-of-a-process

28: less – less displays last 5 lines of a given file.

less filename

29; ls – ls lists all the files and directories in a specified directory in a vertical order.

linux@india365:~/work$ ls
backup example hello1 hello2 note sample save test test1
linux@india365:~/work$ ls -lrth
total 1.3M
drwxr-xr-x 2 linux linux 4.0K 2011-01-12 01:04 backup
-rw-r–r– 1 linux linux 17 2011-01-12 14:20 sample
-rw-r–r– 1 linux linux 6 2011-01-12 14:20 note
-rw-r–r– 1 linux linux 28 2011-01-12 14:21 example
drwxr-xr-x 2 linux linux 4.0K 2011-01-12 14:21 save
-rw-r–r– 1 linux linux 20 2011-01-13 00:14 hello2
-rw-r–r– 1 linux linux 1.3M 2011-01-13 11:47 test
drwxr-xr-x 2 linux linux 4.0K 2011-01-13 11:48 test1
-rw-r–r– 1 linux linux 12 2011-01-13 11:51 hello1

30: man – man provides you a help manual for any command in linux.

man sudo

If you like this article, then please consider sharing it. Sharing really inspires us to do things much better!!

Leave a Reply

Your email address will not be published. Required fields are marked *