LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 09-02-2004, 11:16 PM   #1
doody
LQ Newbie
 
Registered: Aug 2004
Distribution: Slackware
Posts: 28

Rep: Reputation: 15
Newbie learned his lesson...


Well, now I know why it is bad practice to write code while logged in as root =) I'm learning SDL and after running one of the programs I had written I started getting "Segmentation Error" when trying to use 'ls' and 'tar'. I restarted my computer and got a nasty error saying /dev/hda2 could not be mounted.

Well, at least I've learned enough in the last couple of days to be able to reinstall linux and get my internet connection working (first try this time!).

So, I have now learned my lesson and will not develop code while logged in as root =)

- Stephen
 
Old 09-02-2004, 11:33 PM   #2
tekmorph
Member
 
Registered: Aug 2004
Location: Ohio
Distribution: Mandrake 10.0
Posts: 68

Rep: Reputation: 15
I didnt know that, am fresh to Linux., and have been writing code all day. Thanks for the heads up!
 
Old 09-02-2004, 11:36 PM   #3
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,114

Rep: Reputation: 312Reputation: 312Reputation: 312Reputation: 312
Thanks for posting that -- it's a lesson that every Linux users ought to take to heart (only use the priviliges you need, particularly when trying out new, possibly buggy software, whether it's written by you or somebody else). Let this be a lesson for those people who come in here asking "Why can't I just do everything as root?"

N.B. sometimes it's impossible to avoid running new code as root, for instance when developing system programs (or even kernel programs, which run with kernel priviliges). In these cases, it's a good idea to test the code on a separate machine that you would not mind reinstalling if something goes wrong.
 
Old 09-02-2004, 11:48 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,978
Blog Entries: 11

Rep: Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879
Quote:
Originally posted by btmiller
N.B. sometimes it's impossible to avoid running new code as root, for instance when developing system programs (or even kernel programs, which run with kernel priviliges). In these cases, it's a good idea to test the code on a separate machine that you would not mind reinstalling if something goes wrong.
In this context :)


qemu is starting to look quite promising,
specially for linux as both host and guest OS ;)

Create a 3 GB disk-img, install a minimal dev-system,
grab a tgz copy of it and - voila! :)

My qemulated Slack (to a command-line login) boots
in only 15s more than the real thing on the same box.
Quite impressive.



Cheers,
Tink
 
Old 09-02-2004, 11:48 PM   #5
redjokerx
Member
 
Registered: Aug 2004
Location: San Diego
Distribution: Slackware
Posts: 303

Rep: Reputation: 31
also have a cd-based distro like knoppix as a back up to check for the harddrive just in case.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
A little success, and a lesson (ATI, Radeon fb) mimithebrain LinuxQuestions.org Member Success Stories 2 11-11-2005 06:11 PM
Need quick port closing lesson Bill Johns Linux - Security 8 07-11-2005 12:47 AM
Begin my first lesson to learn Java satimis Programming 9 02-18-2005 06:26 AM
Can someone give me a lesson on Mount Points? ceg4048 Linux - Newbie 4 12-01-2004 05:18 PM
Lesson learned... Beware of this software... Nichole_knc Slackware 3 04-15-2004 04:56 AM


All times are GMT -5. The time now is 11:17 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration