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!
Notices
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I use Ubuntu and have set a root password, and I now have the ability to su for root control. I do use sudo for quick things like apt-get, but when I have to, say, change permissions on multiple directories, I refuse to do it one sudo at a time.
There isn't much difference between 'su' / 'su -' and 'sudo -i'; the latter also gives you a root shell (with 99.9% root environment) and you can do the same as with your su solution.
I don't have a preference for either approach and use what the distro gives me.
If I'm installing an operating system, I want the unlimited right to have unlimited access to my own system when I want to do certain things. This "sudo-ing" makes me feel like I'm being babypsitted, like I can't be trusted to act as root on my own system.
If I am designing an operating system and giving it away for free, then I want the unlimited right to develop the best possible product that I can vouch for and support. These "Ubuntu must allow unlimited root login!" demands make me feel like you are denying the developers the right to be knowledgeable and opinionated about their own pet projects.
We are living in an age of high standards for consumer product safety. Almost every object in my house, car, and office has some safety feature or built-in redundancy to protect me from harming myself or others. I don't see why software, arguably the most complex and important of our technologies, should be exempt from those high standards?
I'm coming back to Linux after several years of being away from it. When I last used Linux, one of the first accounts set up was a root account and everyone else was a standard user, and root was only used for maintenance. There was nothing like an "administrator" account. I believe that this idea was taken from Microsoft, and I think that it was a change for the worse. If I'm installing an operating system, I want the unlimited right to have unlimited access to my own system when I want to do certain things. This "sudo-ing" makes me feel like I'm being babypsitted, like I can't be trusted to act as root on my own system.
I use Ubuntu and have set a root password, and I now have the ability to su for root control. I do use sudo for quick things like apt-get, but when I have to, say, change permissions on multiple directories, I refuse to do it one sudo at a time.
This all just suggests you don't understand the power of sudo. As we've said elsewhere, "sudo -i" will give you a full root shell. If you think you have to break a perfectly good security model, you're *very* wrong.
If I am designing an operating system and giving it away for free, then I want the unlimited right to develop the best possible product that I can vouch for and support. These "Ubuntu must allow unlimited root login!" demands make me feel like you are denying the developers the right to be knowledgeable and opinionated about their own pet projects.
I consider this to be quite a feasible demand, now let me tell you something. I've been using Windows OS from pre-Win95 era (about 15+ years) and am in the dev field on MS environment for 7 years or so. A few days ago, when I opted to switch to Linux (Ubuntu), I mistakenly used a
Code:
"sudo apt-get autoremove*"
command and found that instead of clear the unwanted archive cache, it emptied my OS. Think it again, a single, simple and small argument in a command! OSes meant for end-users (and developers from another platforms) should not be given complete access by default, I guess.
I consider this to be quite a feasible demand, now let me tell you something. I've been using Windows OS from pre-Win95 era (about 15+ years) and am in the dev field on MS environment for 7 years or so. A few days ago, when I opted to switch to Linux (Ubuntu), I mistakenly used a
Code:
"sudo apt-get autoremove*"
command and found that instead of clear the unwanted archive cache, it emptied my OS. Think it again, a single, simple and small argument in a command! OSes meant for end-users (and developers from another platforms) should not be given complete access by default, I guess.
I'm afraid I don't understand your story/example/point at all.
The command is harmless/meaningless on my machine (a totally stock install of Ubuntu 12.04).
I agree with you that user error executed as root/sudo on the command line can be potentially devastating (misuse of 'rm' for example) but I would consider that a "feature not a bug."
The command is harmless/meaningless on my machine (a totally stock install of Ubuntu 12.04).
I agree with you that user error executed as root/sudo on the command line can be potentially devastating (misuse of 'rm' for example) but I would consider that a "feature not a bug."
I'm sorry, it seems that I posted a wrong command-line code and perhaps a wrong access level, but the command arguement "autoremove" somehow emptied my installation! As you can see I'm a novice in *NIX platform, I mentioned a wrong command as harmful! As for the "feature not a bug": surely they are features, I have not considered them as "bug".. that's why I'm in Linux. Feature, indeed, but has potential to devastate.
The power considered as feature by experienced developers, could sometimes be proved to be a disaster to a novice developer and/or an end-user. That was my point.
I do not want to defend Ubuntu, because I hate it. But in this case I am forced to. The OS is at fault, because you made a mistake? That's logical.
Perhaps you didn't read the post on which i made that reply. I didn't say the OS is at fault, I said that anyone could make a mistake without unlimited access and without sufficient knowledge and experience in development.
You defended Ubuntu even you hate it? That's even more logical, I must admit.
Two of the basic rules of life:
The proper procedure for any tool is to learn how to use it before putting it to use.
Learn the basics before attempting anything advanced.
Linux gives people power over their computers, but using that power requires knowledge. It is expected that people will learn at least the basics of shell commands, before they start using the terminal. (common sense)
This is not in any regard directed at you, but merely a general comment. One of the many things I have against Ubuntu is the forum culture of spoon-feeding answers (shell commands) with neither sufficient explanation nor encouragement to learn. The result is a legion of cut-and-paste terminal users, which is a very dangerous thing. [End of rant.] (And I probably just made many enemies on the board.)
Last edited by Randicus Draco Albus; 07-24-2012 at 05:18 PM.
You were looking for a command to "clear the unwanted archive cache" but you chose the wrong one. I believe for that you want to use:
Code:
sudo apt-get clean
That command should be harmless, however please keep in mind it is entirely optional. Unless you have a very small hard drive and are running out of room, there is no reason to use this command.
On the other hand:
Code:
sudo apt-get autoremove
is a very powerful and dangerous command (as you discovered). Break the word down: "remove"=delete some stuff from my system; "auto"=do it automatically rather than letting the user pick and choose. Then the computer gives you a list of "I'm thinking about deleting this stuff, what do you think, user, Yes or No?" and you have the opportunity to review the list. If you don't like the computer's suggestion what to remove then say no.
Again, "sudo apt-get autoremove" is a completely optional command, there is no reason to run it unless you need that extra few megabytes of hard drive space. So if you are considering running this command to have the computer automatically remove some stuff, weigh the pros/cons of that decision vs. the benefit of freeing up a few mb's of space...
(edit) ps Ubuntu has provided you with completely point-and-click GUI tools for installing/removing/updating software, namely the Ubuntu Software Center and the Update Manager. You can use these tools with confidence even if you don't know a thing about the terminal.
is a very powerful and dangerous command (as you discovered).
The man page has the true answer...
Code:
$ man apt-get
Quote:
autoremove
autoremove is used to remove packages that were automatically
installed to satisfy dependencies for some package and that are no
more needed.
To cut a long story short, if you apt-get remove e.g. a meta package, the automatically installed cruft which was pulled in by the package gets left behind, when you next run "apt-get autoremove", the cruft gets removed. Using aptitude instead of apt-get avoids this as it removes automatically installed packages immediately. In a nutshell, it is safe, desirable even, to do an autoremove, and if it takes out half of your system, then you're not administering said system correctly (you could also... you know, read the output and hit the letter "n" when it asks you if you want to remove everything).
@snowpine and @caravel: Thanks a ton to you two. You have cleared the basic logics behind hardcore development through your posts. I found your posts very helpful.
Please enlighten my knowledge in the next thread I'm going to create regarding Deepin Software center.
Two of the basic rules of life:
The proper procedure for any tool is to learn how to use it before putting it to use.
Learn the basics before attempting anything advanced.
Quite thoughtful and enlightening. But I thought this forum was called "Linux- Newbie" and with my pre-basic knowledge, I thought that a forum is the best classic way to know from the knowledgeable people who want to help out (I sincerely count you among them) by sharing their experience and knowledge and/or by showing them the right paths to the next level to the basics.
Quote:
Linux gives people power over their computers, but using that power requires knowledge. It is expected that people will learn at least the basics of shell commands, before they start using the terminal. (common sense)
When you test a flavour (distro in this case), how often do you stop yourself from trying newer shell commands (like 'sudo'/'apt-get'/'yum'/'vi' and their different aspects and powers) even if it can "killall"? Specially if you you're a developer once giving productivity a higher priority than "power" (like Windows/.NET environment) and now trying to get the power regardless of basic/advanced/whatever knowledge? (A more specific and typical sense).
Thanks for posting in this thread. No offence, please.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.