Archive for the ‘Linux’ Category

Beginning Ubuntu Linux, Fourth Edition

Posted in Ebook, Linux  by kissdeath on September 18th, 2009

English | 800 pages | Apress; 4 edition (August 22, 2009) | ISBN: 1430219998 | PDF | 17.3 MB

Beginning Ubuntu Linux, Fourth Edition is the update to the best–selling book on Ubuntu, today’s hottest Linux distribution. Targeting newcomers to Linux and to the Ubuntu distribution alike, readers are presented with an introduction to the world of Linux and open source community, followed by a detailed overview of Ubuntu’s installation and configuration process. From there readers learn how to wield total control over their newly installed operating system, and are guided through common tasks such as writing documents, listening to audio CDs and MP3s, watching movies, using VOIP and chat, and of course general system maintenance matters.
Read the rest of this entry »

LPIC-1: Linux Professional Institute Certification Study Guide, 2nd Edition

Posted in Ebook, Linux  by kissdeath on August 9th, 2009

LPIC-1: Linux Professional Institute Certification Study Guide: (Exams 101 and 102)

Product Details

Paperback: 624 pages
Publisher: Sybex; 2 edition (February 24, 2009)
Language: English
ISBN-10: 0470404833
ISBN-13: 978-0470404836

More info: http://www.amazon.com/LPIC-1-Linux-Professional-Institute-Certification/dp/0470404833

Read the rest of this entry »

Adding a directory to your $PATH

Posted in Linux  by kissdeath on June 13th, 2009

In the Linux operating system the $PATH is a listing of all directories where the system will look for commands. What this means is that all of the commands located in the directories included in your path will be globally executable. For example: The /usr/bin directory contains quite a lot of commands that can be excuted from within any directory on your system. Because of this you can issue the ls command from within any directory and get the listing of the contents of that directory. If the ls command wasn’t in a directory in your path you would have to include the explicite path to that command (i.e. /usr/bin/ls).

As a Linux user you can add directories to your $PATH. This is helpful when you don’t want to add a command to a directory in your $PATH but you want that command to be globally executable. Doing this is actually quite easy.

What is currently in your $PATH?

NOTE: This article applies only when you are using the Bash shell. To find out what directories are included in your current $PATH issue the command:

echo $PATH

You should see something like:

/usr/lib/qt-3.3/bin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/jlwallen/bin

Notice the /opt directory is missing. Often the /opt directory is a great place to “install” other applications for global use. But if this directory is not in your $PATH, you will always have to use the explicit path to call a command. With that in mind let’s add /opt.

.bash_profile

In order to add a directory you have to edit a file in your ~/ (home) directory. The .bash_profile file determines user specific environment and start up programs. This file also checks for a .bashrc file for aliases and functions, but that has nothing to do with your $PATH.

There is one particular line you need to examine in your .bash_profile:

PATH=$PATH:$HOME/bin

This is the line that determines anything extra in your $PATH. As you can see, in the example above, the extra directory added to the users’ $PATH is the ~/bin directory. Of course in most distributions this isn’t used (or even created during installation). Why ~/bin is still included I do not know. In order to add another directory to your $PATH in this line you would seperate the directories with a “:”. To add the /opt directory that line would now look like:

PATH=$PATH:$HOME/bin:/opt

As you can see the /opt directory has been added proceeding a “:”. Complete this addition and save the file. You’re not done yet.

If you issue the command echo $PATH you will still not see /opt in the users’ $PATH. Why? You have to log out and log back in before this change will take effect. So log out, log back in, and issue the command again. Issuing the command echo $PATH will not issue:

/usr/lib/qt-3.3/bin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/jlwallen/bin:/opt

Any command found in the /opt directory is now global.

Final thoughts

The $PATH is a very powerful tool to take advantage of in Linux. By using it you can install applications in directories outside of the norm and still make them global. I often install applications in the /opt directory or will create a /data directory for a more temporary application installation.

Source.

How to configure network interfaces configuration files in Linux?

Posted in Linux  by kissdeath on June 2nd, 2009

by fujisai

Vấn đề này chưa xong vấn đề kia đã ùn ùn kéo tới … haizz, dùng Linux là thế đấy. Hôm nay tôi xin viết một bài nhỏ hướng dẫn một chút về một trong những “vấn đề” cơ bản trong khi sử dụng Linux. Đó là cấu hình “card mạng” của máy tính sử dụng Linux thông qua file config.

Mọi người dùng Linux chắc hẳn đều biết mọi cấu hình trong Linux nói chung đều có thể được nhúng tay vào chỉnh sửa trong một hoặc vài file cấu hình nào đó. Nếu chưa dùng hoặc dùng Linux chưa quen bạn sẽ nói ngay rằng làm thế thật là phức tạp, nhưng nếu dùng nhiều bạn sẽ phát hiện ra rằng cách đó không hề tồi  , nói cũng rất nhanh mà còn làm cho bạn hiểu rõ hơn về cái bạn đang làm việc. Mà nhất là khi một ngày đẹp trời nào đó thành phần đồ họa trong Linux của bạn có vấn đề chẳng hạn.

“Ngày đẹp trời” đó đến với tôi khi tôi chợt phát hiện ra (hoặc nhớ ra, vì rõ ràng tôi cũng dùng cái máy đó từ lâu rồi, và cũng phải cấu hình mạng cho nó rồi  ) cái CentOS tôi đang dùng không hỗ trợ lệnh netconfig rất tiện mà hồi trước tôi hay dùng với RHEL4. Vậy là tôi buộc phải động tới file cấu hình của card mạng

Đại loại các bước sẽ như thế này:

1. Tìm  file cấu hình card mạng

- Đối với RHEL/CentOS/Fedora: mỗi card mạng sẽ có một file với đường dẫn dạng:

/etc/sysconfig/network-scripts/ifcfg-<interface_name>

ở đây interface_name là tên của card mạng trong máy bạn, thường thì nếu máy bạn có 1 card mạng ethernet nó sẽ là eth0.

- Đối với Debian/Ubuntu: tất cả các card mạng trong máy được cấu hình trong cùng một file tại đường dẫn:

/etc/network/interfaces

2. Xác định hình thức cấp IP và sửa file cấu hình theo hình thức đã chọn

- Nếu là DHCP:

+ RHEL/CentOS/Fedora: sửa file thấy bên trên kia thành

DEVICE=eth0
ONBOOT=yes
BOOTPROTO=dhcp

+ Debian/Ubuntu: thêm vào file trên kia một đoạn như sau

auto eth0
iface eth0 inet dhcp

- Nếu là static IP:

+ RHEL/CentOS/Fedora: sửa file thấy bên trên kia thành dạng như sau

DEVICE=eth0
BOOTPROTO=static
IPADDR=XXX.XXX.XXX.XXX
NETMASK=255.255.255.0
GATEWAY=XXX.XXX.XXX.XXX
ONBOOT=yes

+ Debian/Ubuntu: thêm vào file trên kia một đoạn như sau

auto eth0
iface eth0 inet static
address 208.88.34.106
netmask 255.255.255.248
broadcast 208.88.34.111
network 208.88.34.104
gateway 208.88.34.110

Các trường trong các file trên nói chung là dễ hiểu, còn nếu bạn muốn tìm hiểu kỹ thì hãy tham khảo links được đưa phía cuối bài viết!

3. Thêm vào cấu hình DNS (làm bước này nếu ở bước số 2 bạn chọn Static IP)

- Tìm file /etc/resolv.conf

- Sửa file này bằng việc thêm vào dòng:

nameserver XXX.XXX.XXX.XXXIP address of primary name server
nameserver XXX.XXX.XXX.XXX - IP address of secondary name serve

4. Restart dịch vụ mạng để máy tính nhận lại cấu hình

- RHEL/CentOS/Fedora: có thể dùng một trong hai cách

+ service network restart

+ /etc/init.d/network restart

- Debian/Ubuntu: sudo /etc/init.d/networking restart

Đến đây nhìn chung là bạn đã có thể sử dụng được network rồi  . Chúc mừng!!!

Còn nếu có vấn đề gì, hoặc cần tìm hiểu thêm về các trường xuất hiện trong các file cấu hình kia, bạn có thể tham khảo tại địa chỉ:

http://www.yolinux.com/TUTORIALS/LinuxTutorialNetworking.html#CONFIGFILES

http://www.redhat.com/docs/manuals/linux/RHL-8.0-Manual/ref-guide/s1-networkscripts-interfaces.html

Source.

Linux Administration: A Beginner’s Guide, Fifth Edition

Posted in Ebook, Linux  by kissdeath on May 10th, 2009

Wale Soyinka, “Linux Administration: A Beginner’s Guide, Fifth Edition”
McGraw-Hill Osborne Media | ISBN: 0071545883 | September 23, 2008 | 662 pages | PDF | 3.7MB

Administering a Linux system isn’t much like administering a Windows machine. Though the goals are similar and comparable problems arise under both environments, they each require administrators to adopt a certain way of thinking about processes and data. Linux Administration: A Beginner’s Guide helps readers adapt their Windows experience to Linux work. Author Steve Shah does a great job of clueing Linux newcomers into the environment. His explanations are clear, patient, accurate, and useful, and they cover all aspects of the system administrator’s job. He’s careful to explain hundreds of commands in a logical way, including lists of options and examples of typical uses in many cases.

Link: 3.71MB

http://www.mediafire.com/download.php?hwizm3noxym

Where do I find Linux software?

Posted in Linux, Tips-Thủ thuật  by kissdeath on April 25th, 2009

If you are a Windows user you most likely know where to get software. You can either go to your local software retailer or you can go to a place like downloads.com. But what if you are searching for Linux software? Where do you go? Is there a one stop shop for all of your software needs? Yes and no. Even though that answer is not a resounding YES! there is a plus side – there are tons of software titles to have with Linux. But without knowing where to look, the downside is you might not even know that software exists.

With that in mind I am going to point out some of the best ways (and places) to find software for the Linux operating system. Some of these might be all too obvious. Some may not. We’ll start with the obvious.

Read the rest of this entry »