Linux - NewbieThis 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!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Originally posted by gsibble 1. What is the fastest and easiest way to check my IP address adn the config of my current network situation? (IE="ipconfig" in windows)
2. If I have a program that needs some root privledges for something and I want to run it as root, but call it from my current user, how do I do this?
IE. I want to type something like "su && nmap -sS www.linuxquestions.org" but I know that isn't the way to do it.
I'd be happy to have it ask for the root pass, but I just want an easy way to run it without typing su each time.
Master, I'm timing how long it takes you to get the answer for these!!!
Sorry, been a bit busy tonight at the pharmacy
2. Using sudo would likely be what you are looking for, but you'll be in the predicament of still typing:
each time, it's a save of a few keystrokes in the end, and consider a better way of using root priv's than su - 'ing each time.
Check out man sudo for more info, it's really not as tricky as it reads though once you use it in practice.
alias ws="echo Changing Network Interface to Dell Truemobile 1150... && sudo /etc/sysconfig/network-scripts/ifdown eth0 && sudo /etc/sysconfig/network-scripts/ifup eth1"
alias wd="echo Changing Network Interface to 3COM 10/100 Adapter... && sudo /etc/sysconfig/network-scripts/ifdown eth1 && sudo /etc/sysconfig/network-scripts/ifup eth0"
You know you like it
Now the annoying part is that I can't make it ask for my root password, or at least haven't figured that part out yet. I wish it would because I don't want anyone logged in as me to be able to do this. I don't think it can be done though, at least without more editing of sudoer which is kinda scary to edit because one wrong line and there goes root's root privledges!!!!
Well, actually editing sudoers isn't as detrimental as that, not to my knowledge anyway.
Prompting for a root pass might be doable, but I don't think it'd be worth it in that situation. Best thing to do is make yourself a superuser group type thing, give yourself as little privs as you can in this group, but be able to perform small tasks that normal users can't. Then add your 'super user' to that group. It'll be a good learning experience along the way if nothing else.