Linux.com

Community Blogs



The Importance of Keeping Notes

All Linux Adventurers, but most especially new ones, will find it beneficial in the extreme to keep notes of their adventures as they progress in GNU/Linux Land.

My Linux Notebook is a simple bound composition book that you can buy in any grocery or general merchandise store. It looks like this...

 

... and costs a buck or so. If I had known then what I know now, I would have chosen a loose leaf version. I have many additions to my current notebook. I just slide in loose leaf pages within this existing composition notebook. A loose leaf binder would have been neater.

I divided up my notebook with stick on tabs. They divide the notebook into "General Linux" and "<insert name here>" distributions. I have a tab for each distribution that I've ever installed on any of my systems.

From the very start of the particular Linux adventure, the downloading/burning of the CD/DVD, I am taking notes. I write down the source of the download, the date of the CD/DVD creation, the method and means of partitioning, etc. After that, I take notes on everything that I do to setup and customize the operating system. 

As I continue to use and learn more about the particular distro, I maintain my notes for that distribution. Not only is it helpful in learning the particular ins and outs of a distribution, but it's very handy to have these notes when helping others or when reinstalling months later.

In the General Linux area, I keep all my notes about BASH, general scripting, init script tricks, tweaks for hardware, tweaks for GUI interfaces, etc. Basically, anything that is useful across Linux platforms gets jotted down in this area.

I cannot tell you the number of times in the past 3+ years that having these notes has saved my rear end. If my house caught on fire, I'd grab four things...my three cats and my Linux notebook!

Best of luck with your Linux Adventure!

Until next time...

~V. T. Eric Layton

***Tempus Fugits***

 

First post!

Hi this is my first post in this new blog, I really like the new linux.com so far and I'm looking forward to see how it will develop...
 

Greetings!

Awesome!! So I finally started a Linux blog. The goal here is to promote Linux through use, projects, and general discussion.

 Ive been using Linux for about 3 years solid (5 off and on). It really hit me when I started Linux From Scratch (on the 6th attempt). From there I switched to Ubuntu (and some of its off shoots like LinuxMint) and dabbled in Fedora.  I got bored over a weekend and started messing with Slackware recently. 

After working as a Windows Administrator for a 3 years, I needed a change of pace. Having a tight budget, I switched from Windows Server 2003 to Ubuntu Server Edition and Mac OS X. I know, Mac, but say what you will, I love it. 

 I plan to use this blog to document some of the things Ive done with my Linux boxes.  Now, I don't plan to rewrite the book on Linux and some of its packages by any means. Ive found some really good tutorials out there on various things but rarely do I find everything in one spot. Here I hope to do that at best. 

 Feel free to contact me, I'll get back to you ASAP. Remember, Linux is a community driven project so feel free to send me stuff (like tutorials, docs, etc) to keep it going. 

 --Nick

 

Pure Magic ...


Well it seems like magic ... rebuilt my system from scratch with PCLinuxOS 2009.1 in just over 3hrs!!

For some reason i was getting 'dead.letter' mail advising the possibility of intruders ... and since i do not have the expertise to follow through with investigating the situation i just 'bit the bullet' and rebuilt the system.

What makes it easy and quick for me now [it has not always been this way] is that i have a 'master log', or time line, of what i do each time. So it now is just a matter of reinstalling the 'live CD', and working my way through the historical time-line to reinstall and configure the software i use.

So it is NO 'biggie' now days.

One thing that makes it all straight forward is that i DO NOT store any dynamic data on my localhost ... unless it is 'throw away' stuff. All serious data is stored on another pc [WIN XP] and is backed up automatically from there to an external Maxtor 640gig HD.

So because data is never an issue, i can reformat my localhost at the blink of an eye knowing i am only dealing with system stuff.

Remember i am NOT proficient with shell commands ... so all this is done via gui.

HOWEVER, i can do it even faster, as after i rebuild from scratch i then use a piece of software named CLONEZILLA, which i had previously downloaded the ISO and burned it to CD. This is a bare basic program that allows you to take a 'snapshot' of a partition and save it to disk. THEN, when i want to 'rebuild' localhost it is simply a matter of re-storing that partition image via CLONEZILLA .... takes no more that 10mins.

I find this and EXTREMELY useful method of restoring sensibility to my system should it go haywire .... it allows me to test untried software without worrying if it will 'mess up' my system ... because if it does i simply restore the master image via CLONEZILLA ... and bingo ... am back to known territory again.

If the piece of software i 'try out' does the trick and i like it, i simply add it to the 'time line' or 'master install log' i keep, and when things get to a point where synaptic is doing an upgrade, i simply restore the last CLONEZILLA image, work my way through the 'time line', upgrade through Synaptic, and make a NEW 'master image' of the partition, to fall back to should i need it.

For the first time i actually feel in 'control' with Linux ... and NO WAY could i be considered as a GURU, NERD or even on that pathway!!

So im *smiling*

 

My Favorite Linux Distribution

Since I have been running Linux for over a decade, I've had the opportunity to use a variety of different distributions.  From roll-it-yourself Slackware installations to 
 

Joined Linux.com

This's nice place.
 

Understanding su and sudo

First of all, su means super user.  Distros like Ubuntu does not have root account . So what to do if one wants to do administrative tasks? Simple, just log in as super user. How? sudo is the answer. Here, are the steps how to log in as root/super user in distros where there is no root account.

 If you are in GUI mode,

Go to Accessories > Open New terminal then type "sudo su -" thats it you'll become root. And if then, if you want to be super sneaky you can type passwd and change/make new password for superuser account so that next time if you want to log in as root you'll just have to do is...

$ su (enter)
and type the password you set earlier.

 

How a poor boy of an in development country know Linux!

How a poor boy of an in development country know Linux?

All starts with a  simple fail, i need to use a computer, but it doesnot have Hard disk. Flash Drives was so expensive for me, so i rebember of an old conversation with one of my friends:

"I discovered that exist an Operational Sistem where there is no need for Hard Disk, it is Kurumin", it was Kurumin Linux.

So  i gone to my friends house and get one of this old Kurumin CDs, and run it by Live CD. WOW what was that? Runing just on RAM, on a old computer, it was faster than <the other> OS. Time passed and I got money enough to buy a HD, so I decided to install Kurumin in Dual Boot with <the other> OS.

After this i become sad because of some comments about the discontinuity of the Kurumin project. I quit Linux by a month when other friend tell me about Debian, so i downloaded it (yes on this time i become a University Student and get Internet), and instaled it.

WOW again ! another world, another Level!

I started with Debian etch, in January this Year, so i was tenpted to try Debian Lenny. Yes, i gone! Some time past and i get a faster computer and continued using Debian Lenny, now with 1GB RAM! Testing is Great!

Time passed and Lenny Become Stable! Wow it was fantastic! But i could not wait 2 days before going to Squeeze, where i am Now.

The live with Gnu/Linux  is SO EXCITING!, last week i tried to compile a new Linux Kernel. It fails, but this week i will try harder!

 Thank you Linux and GNU developers, you make me become a free man! Now i can use a computer, and change what i want on my PC! Thank you i can use a computer now!

 Ty

 

 

Using Perl to securely execute a command on and copy a file from a server.

This blog will discuss how to both securely execute a command on a remote server and securely copy a file from that server.

Here is the Perl script that can securely execute commands on as well as securely copy files from a server.

 #!/usr/bin/perl -w
##################################################
#This script is responsible for making a secure  #
#connection via ssh to server1 and executing the #
#commaned ls .                                   #
#This script is also responsible for making a    #
#a secure connection via ssh to server1 and then #
#scp the file test.txt.                          #
##################################################

#import required modules
use strict;
use Net::SCP qw(scp iscp);
use Net::SSH qw(ssh);
use Log::Dispatch::Syslog;

#declare local variables
my $scp;
my $host = "server1.domain.com";
my $user = "user1";
my $remotedir = "/home/user1/";
my $file = "test.txt";
my $cmd = "/bin/ls";

####################Log::Dispatch::Syslog#######################################
# Define our pid for use in the log message
my $pid = getppid();
# Define our logfile object
my $logfile = Log::Dispatch::Syslog->new( name => 'logfile',
                                          min_level => 'info',
                                          ident => "running_list_cmd[$pid]" );
####################Log::Dispatch::Syslog#######################################

######first connect to $host via Net::SSH and run /bin/ls###########
$logfile->log( level => 'info', message => "Connecting to $host as $user and running /bin/ls ..." );
ssh("$user\@$host", $cmd);
$logfile->log( level => 'info', message => "ls completed successfully!" );
######first connect to $host via Net::SSH and copy file $file###########

#initialize Net::SCP object and send credentials
$scp = Net::SCP->new($host);

#notify user we're logging into $host
print "Logging into $host ...\n";

#write "connected to $host" to $file
$logfile->log( level => 'info', message => "Connected to $host successfully." );

#log into $host as $user
$scp->login($user) or die $scp->{errstr};

#write "connected to $host" to $file
$logfile->log( level => 'info', message => "Logged into $host successfully." );

#notify user of changing working directory to $remotedir
print "Chaging working directory to $remotedir\n";

#change working directory to $remotedir
$scp->cwd($remotedir) or die $scp->{errstr};

#Write Changed working directory (CWD) to $remotedir
$logfile->log( level => 'info', message => "CWD to $remotedir successfully." );

#display file size of $file
$scp->size($file) or die $scp->{errstr};

#notify user scp of $file has started
print "SCPing $remotedir$file from $host ...\n";

#scp $file from $host
$scp->get($file) or die $scp->{errstr};

#notify user scp of $file from $host was successful
print "$remotedir$file copied from $host successfully!\n";

Disclaimer:  This blog entry comes with NO expressed warranty, guarantee, support, or maintenance of any kind!  Use at your own risk!   

Good luck and hope you find this useful.

 

Nice console regex helper

Last week I stumbled on a nice console regex helper. It’s not that I’m bad at regex but switching between sed, vim, python, perl regex trips me up a bit sometimes.

Full Post

 

Good for the (open) soul

Wow, Linux.com has really been buzzing with activity today.. Good to see the community active, and striving towards better things. Good to see the community being listened to, as well. Good to see the community not abusing being listened to, too ;P

 Forums could be a bit busier though, but they should catch on.. But no, lets not spoil the post with negativity, it's a good day, on a good site, using a good OS :D

 
Page 116 of 126

Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board