Friday, December 22, 2006
Learn the DD command - LinuxQuestions.org
Some very useful tips and information about dd command....
Oh it also shows you how you can easily create a boot USB flash drive.
Check it out at www.linuxquestions.org
Friday, November 24, 2006
Linux.com | Tips for new Gentoo users
Linux.com | Tips for new Gentoo users
Tuesday, November 21, 2006
Linux.com | Easy video creation using only FOSS software
Creating videos on Linux is easy and free!
Linux.com | Easy video creation using only FOSS software
Friday, November 03, 2006
Network Configuration Using the Command Line
Introduction Each Linux distribution has its own tool or utility for configuring an ethernet card and network settings. However, learning how to do this using only an xterm session will allow you to configure the network on almost any Linux box.
Network Configuration for a Static IP Address Using the Command Line
Load the proper module(driver) for your ethernet card:
The list of compiled ethernet card drivers that come with your system are usually located under/lib/modules/2.2.14-5.0/net
where2.2.14-5.0
is your kernel version. The source code for these drivers are usually located at/usr/src/linux-2.2.14/drivers/net
again where 2.2.14 is the kernel version you are running. Sometimes the comments at the beginning of the source code file will tell you which ethernet cards the driver is for. Some distributions will find it during installation and automatically load the driver for you. To see if this is the case, view the file/etc/modules.conf
or/etc/conf.modules
depending on your distribution. If you see a line that looks similar toalias eth0 ne2k-pci
, then the third item on the line is the module being used for your ethernet card. In this example, ne2k-pci, the NE2000 driver is being used. To verify the module has been loaded successfully, issue the command/sbin/lsmod
. This will display all modules successfully loaded in the system. Once your module is loaded, you are ready to move to the next step.
If the module is not loaded, but you know what module your network card uses, issue the following steps as root:Make sure the network is stopped by issuing
/etc/rc.d/init.d/network stop
.Manually load the module by issuing
/sbin/insmod ne2k-pci
replacing ne2k-pci with whatever your module is. This module must be present in the/lib/modules/2.2.14-5.0/net
directory forlsmod
to find it.Verify it loaded successfully by issuing
/sbin/lsmod
.Activate the eth0 device by issuing
/etc/rc.d/init.d/network start
Configure your network settings with steps 2-6. You must still be root to perform these steps.
Set the IP address and network mask:
/sbin/ifconfig -a eth0 192.168.1.5 netmask 255.255.255.0
This example gives the machine the IP address 192.168.1.5, but you can use any combination of IP/netmask that will work with your network.Verify the settings with
/sbin/ifconfig eth0
.Add the default gatway:
/sbin/route add default gw 192.168.1.254
replacing 192.168.1.254 with your gateway.Verify the gateway setting:
/sbin/route
. The line beginning withdefault
should have your gateway under thegateway
column.Alternately, you can edit the file
/etc/sysconfig/network-scripts/ifcfg-eth0
to look like (replace with your network numbers)DEVICE=eth0 USERCTL=no ONBOOT=yes BOOTPROTO=none BROADCAST=192.168.1.255 NETWORK=192.168.1.0 NETMASK=255.255.255.0 IPADDR=192.168.1.5
and the file
/etc/sysconfig/network
to look like (replace with your network numbers and hostname)NETWORKING=yes HOSTNAME=name.host.net FORWARD_IPV4=yes GATEWAYDEV= GATEWAY=192.168.1.254
Ping the gateway and a few other computers on the network to verify your settings are correct.
Network Configuration for DHCP Using the Command Line
Load the proper module(driver) for your ethernet card:
The list of compiled ethernet card drivers that come with your system are usually located under/lib/modules/2.2.14-5.0/net
where2.2.14-5.0
is your kernel version. The source code for these drivers are usually located at/usr/src/linux-2.2.14/drivers/net
again where 2.2.14 is the kernel version you are running. Sometimes the comments at the beginning of the source code file will tell you which ethernet cards the driver is for. Some distributions will find it during installation and automatically load the driver for you. To see if this is the case, view the file/etc/modules.conf
or/etc/conf.modules
depending on your distribution. If you see a line that looks similar toalias eth0 ne2k-pci
, then the third item on the line is the module being used for your ethernet card. In this example, ne2k-pci, the NE2000 driver is being used. To verify the module has been loaded successfully, issue the command/sbin/lsmod
. This will display all modules successfully loaded in the system. Once your module is loaded, you are ready to move to the next step.
If the module is not loaded, but you know what module your network card uses, issue the following steps as root:Make sure the network is stopped by issuing
/etc/rc.d/init.d/network stop
.Manually load the module by issuing
/sbin/insmod ne2k-pci
replacing ne2k-pci with whatever your module is. This module must be present in the/lib/modules/2.2.14-5.0/net
directory forlsmod
to find it.Verify it loaded successfully by issuing
/sbin/lsmod
.Activate the eth0 device by issuing
/etc/rc.d/init.d/network start
Configure your network settings with steps 2-4. You must still be root to perform these steps.
Edit/create the file
/etc/sysconfig/network-scripts/ifcfg-eth0
to use DHCP.
Sampleifcfg-eth0
file:DEVICE=eth0 USERCTL=no ONBOOT=yes BOOTPROTO=dhcp BROADCAST= NETWORK= NETMASK= IPADDR=
Replace
eth0
above witheth1
if it is the second network card in your system.Edit/create the file
/etc/sysconfig/network
to use DHCP.NETWORKING=yes HOSTNAME= FORWARD_IPV4=yes GATEWAYDEV= GATEWAY=
Restart the network to probe the DHCP server for your network settings with the command
/etc/rc.d/init.d/network restart
.Verify your network settings with the command
/sbin/ifconfig
to make sure you have received an IP address from the DHCP server.Ping the gateway and a few other computers on the network to verify your connection.
Sunday, October 22, 2006
Linuxtopia - On-line Linux and Open Source Technology Books and How To Guides
Linuxtopia is an extensive online resource for anyone learning or deploying enterprise level open source technology. Whether you are a C, C++, Java or Web developer, a system or database administrator, hardware engineer or a security specialist you will find Linuxtopia to be an indepensable source of technical information.
Read more at www.linuxtopia.org/inde...
Tuesday, October 17, 2006
LSB Developer Network: An MSDN for Linux
I really think that the Linux Standards Base is key to mainstream Linux. I'm glad it's evolving and growing. Watch out Bill Gates! Your honey moon will be over soon.
Read more at www.eweek.com/article2/...
Wednesday, October 11, 2006
What's the best Linux for beginners?
Read what he has to say here ......
What's the best Linux for beginners?
Monday, October 09, 2006
Linux.com | Point, click, root: System exploitation with open tools
IT managers face a problem determining what products and policies are best to properly secure their network. The problem with many security products is that it is hard to validate their claims. Penetration testing is a process for testing the security of networks by imitating an attacker. This process typically involves gathering information through Internet searches and other open sources, scanning and mapping the targeted network with tools like Nmap, determining vulnerabilities on targeted computers, and exploiting those computers. Conducting a successful penetration test involves a great deal of knowledge and a wide variety of software, including some of the following open source tools.
Read more at www.linux.com/article.p...
Saturday, October 07, 2006
Why Linux will dominate the future of servers
George Weiss, Gartner's open-source analyst, recently said that Microsoft Windows will not suffer irreparable damage on the server side at the hands of Linux over the next five years. He's right. Microsoft will fall flat on its face all by itself, and Linux will pick up afterwards.
Read more at www.linux-watch.com/new...
Friday, September 22, 2006
jUploadr - A photo uploader for Linux, Mac and Windows
read more | digg story
Thursday, September 21, 2006
How much abuse will you take from Microsoft?
Seriously, how many times must users and businesses be kicked in the face before they buy a clue? Before they realize that they don't have to stay in the abusive Microsoft relationship. The answer seems to be: an unlimited number of times.
Read more at www.linux-watch.com/new...
Saturday, September 16, 2006
LXer: Companies selling preinstalled Linux and no-OS: Linux
Tuesday, September 05, 2006
HOW-TO: Dreamweaver AND Flash 8 Running on Ubuntu Dapper!
read more | digg story
Monday, September 04, 2006
Linux.com | Convert any video file to DVD with open source tools
You've just downloaded the new episode of your favorite video podcast, and you'd like to watch it on your big-screen TV. Unfortunately, the video is encoded in XviD or QuickTime format, which your DVD player doesn't support. Don't worry -- here's how you can convert any video file to DVD using dvdauthor and MPlayer.
Packages for both programs are available for most Linux distributions and BSDs, so you can install them on your favorite OS easily. Compiling the programs from source isn't difficult, as long as you get their dependencies right. Both programs provide adequate documentation about the installation. You can burn the final files to a DVD disc with the help of the growisofs utility from the dvd+rw-tools suite.
Converting the files to MPEG-2
First, you must convert your file to MPEG-2 for the video and to AC3 for the audio, in order to be compliant with the DVD video specifications. If the audio on your file is already encoded in AC3 format, you can use it as is without re-encoding it. Run this command to check the audio format of the file:
mplayer -vo dummy -ao dummy -identify your_video.avi 2>&1 | grep AUDIO_FORMAT | cut -d '=' -f 2
If it returns hwac3
, the audio part of your file is encoded in AC3, and you can convert the file to MPEG-2 with the following command:
mencoder -oac copy -ovc lavc -of mpeg -mpegopts format=dvd -vf scale=720:576,harddup -lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=5000:keyint=15:aspect=16/9 -ofps 25 -o your_video.mpg your_video.avi
If it isn't encoded in AC3, run this command:
mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=dvd -vf scale=720:576,harddup -srate 48000 -af lavcresample=48000 -lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=5000:keyint=15:aspect=16/9:acodec=ac3:abitrate=192 -ofps 25 -o your_video.mpg your_video.avi
The previous commands create an MPEG-2 file in phase-alternating line (PAL) format with an aspect ratio of 16:9. PAL is used in most of Europe (except France). If you want to create a National Television System Committee (NTSC) DVD, which is the North American video standard, replace scale=720:576
with scale=720:480
, keyint=15
with keyint=18
, and -ofps 25
with -ofps 30000/1001
. If you don't have a wide-screen TV, you should encode your file with an aspect ratio of 4:3 by replacing aspect=16/9
with aspect=4/3
.
For more information, check the MPlayer's man page, which provides detailed explanations about each option used in these commands.
This process should take some time to finish. My 1.5GHz Centrino laptop took about 25 minutes to convert a file with a one-hour runtime that was encoded in XviD.
Creating the DVD structure
Now you can use dvdauthor to create the layout of the DVD from the MPEG-2 file of your video. Although you can pass any options to dvdauthor directly from the command line, it's easier and more flexible to create an XML file with the appropriate options instead. Open your favorite editor and create a file called dvd.xml with the following contents:
<dvdauthor>
<vmgm />
<titleset>
<titles>
<pgc>
<vob file="your_video.mpg" chapters="0,0:10,0:20,0:30,0:40,0:50" />
</pgc>
</titles>
</titleset>
</dvdauthor>
I split my hour-long video into six 10-minute chapters. Adjust the chapters=
option for your video, or remove the option from your XML file if you don't want chapters.
Type dvdauthor -o dvd -x dvd.xml
to create the layout of the DVD; the -o
switch defines the output directory, and -x
is used for the XML file. This command takes five to 10 minutes, depending on your video size and your CPU speed. Once it completes, you'll have a directory named dvd with two subdirectories: AUDIO_TS and VIDEO_TS. Before burning the video to a disc, you can check it by running mplayer dvd:// -dvd-device ./dvd
.
If the video plays correctly, you can burn it onto a DVD disc with growisofs by running growisofs -dvd-compat -Z /dev/dvdrw -dvd-video ./dvd/
. Make sure to replace /dev/dvdrw
with the device name of your DVD recorder.
The only thing left is to make some popcorn, get your favorite beverage, and enjoy the show.
Links |
- "dvdauthor" - http://dvdauthor.sourceforge.net/
- "MPlayer" - http://www.mplayerhq.hu/design7/news.html
- "dvd+rw-tools" - http://fy.chalmers.se/~appro/linux/DVD+RW/
- "MPlayer's man page" - http://www.mplayerhq.hu/DOCS/man/en/mplayer.1.html
Friday, August 25, 2006
Novell Linux 10 xgl Technology Demonstration
Novell Linux has just released this amazing technology demonstration video showing off some of the new features of their impressive operating system. While Windows Vista takes about 500MB to boot this Linux technology can run on almost any hardware. If you have ever seen Windows Vista then you will know it's extremely slow and buggy. It has been in development for nearly 5 years. This Linux technology has only been in development for about 5 months and you will notice that it's running very well. The system used was an old system with only 256MB's of ram. Windows Vista won't even boot on that. This shows that yes you can have awesome eyecandy without having to have 4 graphics cards and a Quantum computer. Linux has yet again reinvented the desktop. Linus has no reboots, not even in installation, Linux has ADM technology which means no need to install drivers anymore unless you want, Linux has SHC technology which means that if a program was to lock up it would automatically fix the program while it's running and carry on. Linux also has no spyware and virus's. Oh and it's easier to install then any Windows. So why do people still use Windows? Beats me! |
Review: Free Linux Desktops
read more | digg story
Backing up and restoring installed software
Task: Backup list of installed software
Debian Linux
If you are using Debian Linux use dpkg command to list installed software:$ dpkg --get-selections
Store list of installed software to a file called /backup/installed-software.log$ dpkg --get-selections > /backup/installed-software.log
RPM based distributions (RHEL, Fedora Core, Cent OS, Suse Linux etc)
Use rpm command to get list of all installed software:$ rpm -qa
OR$ rpm -qa > /backup/installed-software.log
Task: Restore installed software from backup list
Now you have a list of installed software. After installing base system you can immediately install all software.
Debian Linux
Debian Linux makes your life easy. All you have to do is type following two commands:# dpkg --set-selections < /backup/installed-software.log
Now your list is imported use dselect or other tools to install the package.# dselect
Select ‘i‘ for install the software.
RPM based distro
As far as I know RPM based distro does not offers dpkg kind of facility. But with little shell scripting technquie you can easily install all software:# LIST="$( cat /backup/installed-software.log )"
If you are using yum, type the following for loop to install all software:# for s in $LIST; do yum install $s; done
Update try out following command (thanks to gt):# yum -y install $(cat /backup/installed-software.log)
OR if you are using RHEL (RHN subscriber) :# for s in $LIST; do up2date -i $s; done
Alternatively you use following command:# up2date -i $(cat /backup/installed-software.log)
Tuesday, August 22, 2006
SSH Tunnels: Bypass (Almost) Any Firewall
read more | digg story
Why Is Linux Successful?
read more | digg story
Thursday, August 17, 2006
HOW-TO watch YOUTUBE videos from LINUX Shell Prompt
�s videos, is all the rage these days. Why are we talking about YouTube, in a column about the CLI? Because this week we�re writing about youtube-dl, a clever little CLI tool that�s easy to install and and use to fetch YouTube videos.
read more | digg story
Monolith Media Center brings MythTV to the technophobe
If MythTV's promise of a free Windows Media Center alternative sounds exciting, but you can't quite bring yourself to navigate the trials of a Linux install on your own, then you might be interested in Monolith's pre-built Media Center PCs, which come with MythTV pre-installed on top of Ubuntu Linux. Models start at $650, and include a remote, an IRBlaster, and free electronic programming guide access -- none of those silly TiVo-style monthly fees. Specs range from a single analog tuner to dual HDTV tuners, and you can get a 400GB HDD and DVD burner as well. The 3.2GHz P4 CPU isn't exactly cutting edge, but all the same, the Monolith box should be fine for someone who doesn't want to mess with setup, and isn't afraid to spend a bit more than they would otherwise.
Read more at www.engadget.com/2006/0...
Why your IT Department Hate Macs.
read more | digg story
Saturday, May 13, 2006
Linux quick notes
chmod
to change access mode of a file (file permissions)
u = the user who owns the file
g = the group the file belongs to
o = others
a = all of the above (ab abbreviation for ugo)
example: to prevent outsiders from executing archive.sh before : -rwxr-xr-x archive.sh
command: chmod o=r archive.sh
after : -rwxr-xr-- archive.sh
example : to take away all permissions for the group for topsecret.inf, leave the permissions part of the command empty.
Before : -rw-r----- topsecret.inf
command : chmod g= topsecret.inf
after : -rw------- topsecret.inf
example:
chmod go=rx wordmatic.txt
chmod go-w wordmatic.txt
chmod a+wx calcmatic.bak
To kill non responding application:
ctrl-alt-Esc
move or rename files:
mv
whatis
information on a topic
makewhatis
creates an updated whatis database
umask
the default permission given to new files created
suid and sgid
special permissions given to program so when it runs by a user, it inherits the rights of the owner of the pprogram, not the user running it.
eg. /etc/passwd
setting & removing suid & sgid
for eg.:
# chmod u+s /usr/bin/myapp
# chmod g-s /home/drobbins
Directory permissions:
Directory permissions are a bit different that file permissions.
For a directory, if the “read” (r)flag is set, you may list the contents of the directory.
“write” (w) means you may create files in the directory; and “execute” (x) means you may enter the directory and access any sub-directory inside.
Without the “execute” (x) flag, the filesystem objects inside the directory aren't accessible.
Without the “read” ( r ) flag, the filesystem objects inside the directory aren't viewable but can still be accessible as long as someone knows the full path to the object.
If a directory has the “sgid” flan enabled, any filesystem objects created inside it will inherit the group of the directory. This particular feature come in handy when you need to create a directory tree to be used by a group of people that all belong to the same group.
simply do this:
# mkdir /home/groupspace
# chgrp mygroup /home/groupspace
#chmod g+s /home/groupspace
now any users in the group mygroup can creat files or directories inside /home/groupspace, and they will be automatically assigned a group ownership if mygroup as well. Depending on the users' umask settings, new filesystem objects may or may not be readable, writable, or executable by other members of th mygroup group.
after installing Windows server 2003 on an available partition, the previous grub was destroyed from from MBR by Windows.
solution:
restart from rescue cd
reinstall grub: /sbin/grub-install /dev/hda
symbolic link:
ln -s [target] [link_name]
rsync
eg.:
rsync -av –delete /home/user/ username@server:/backup/home/user
If a directory is being backed up, remember to use / at the end of the directory name.
rsync uses ssh
Users & Groups
newgrp
useradd
groupadd
usermod
userdel -r (-r to remove user home directory too)
groupdel
ACL
acl shou be in the /etc/fstab
# getfacl
# setfacl
VNC
start vnc server:
vncserver
change password:
vncpasswd
connect to server from client by specifying the ip address/hostname and desktop
eg.:
192.168.123.10:1
configuration file:
.vnc/xstartup
default window manager is TWM, you can change it
eg.:
startkde or startgnome
to kill vnc:
vncserver -kill :1
default vnc viewer port: 5901
Java based viewer: 5801
Saturday, April 29, 2006
The Downside of Certification
The worst things that ever happened to IT were Microsoft and certifications.
Off course we all know about the damage Microsoft is doing to the industry. But there is something else they or others had done that let an uneducated workforce into the industry.Certifications are not a replacement for good education and if anything, MCSE is an indication of incompetence. I never met one how is pasionate or eager about the industry and most of them are clueless about other operating systems.
On the other hand, Linux skills are an indication of talent, motivation to develop your career and quick learners.
What are those worthless certifications good for?
Read more at www.eweek.com/article2/...
Sunday, January 22, 2006
LXer: Linux not standing in wait as Microsoft sinks its own ship
Many have predicted the fall of Microsoft. I strongly beleive that this is ultimately the faith of corrupt and nonsensical companies.
IT is now starting to evolve from a Windows monoculture to a dynamic and exciting beast (Heterogenious networks, interactive Web2.0, lots of programming languages, etc.)
It seams that the sooner Microsoft crumbles, the sooner the IT is revived and flurishes.
Read more at lxer.com/module/newswir...