Advanced

10 Linux commands for beginners

Posted by Scott_Ruecker on · 27 comments
TechRadar UK; By Mayank Sharma
Mail this story
Print this story

Most Linux distributions include attractive graphical interfaces, but you can do a lot more from the command line interface once you know your way around. For tasks like controlling and monitoring the distro's underlying system, the command line remains indispensable.

Full Story

  Nav
» Read more about: Groups: Linux; Story Type: News Story

» Get new stories by e-mail: nightly or as they are published

« Return to the newswire homepage

  Related stories
» More like this

Comments (27)

7 earlier comments in the full thread.

Well, but sudo is the standard linux mechanism for granting permissions. Every distro I've ever used in a serious production environment came with sudo configured, out of the box. Of course, we configure it further...

We disable root logins entirely and use sudo to ensure that all superuser actions are logged, so that we know exactly who did exactly what, exactly when. We also use it to grant non-superuser permissions. OTOH su is too coarse grained, and it requires that you give out the root password. With sudo, none of the admins need know the root password, only their own.
> You mean they won't work until you edit the sudoers file with visudo.

If you're expecting to use sudo, and it's not configured, chances are you don't have any way to run visudo either.
Quoting:gus, sudo is not the standard method of escalation
I didn't say "standard." I said "preferred." That is, preferred by the distro architect(s).

Remember AST's quip about standards, and having so many to choose from.
In NetBSD and FreeBSD, the base installs are very minimalist and don't include sudo. I'm pretty sure OpenBSD includes sudo in base.

Nobody's mentioned that Debian doesn't include sudo by default.

I always install and use sudo.
Quoting:If you're expecting to use sudo, and it's not configured, chances are you don't have any way to run visudo either.


Are you assuming that Linux users are too ignorant to know:

su - -c visudo

or even just

su -

to get to a root shell from which they can run visudo? This is one of the first things I do with a Slackware based distro.

Yes, I know, newcomers to Linux won't know su. They won't know sudo either.
> Are you assuming that Linux users are too ignorant to know:

I'm assuming that if they're expecting to run sudo they probably don't know the root password.

> Yes, I know, newcomers to Linux won't know su. They won't know sudo either.

Which was the point of the original comment. Assuming sudo is available is not a good idea.
> I'm assuming that if they're expecting to run sudo they probably don't know the root password.

Why would users be expecting to run sudo if it is not already configured? Of course, if neither sudo is setup nor they know the root password then they cannot run commands with root privileges at all.

> Assuming sudo is available is not a good idea.

As mentioned earlier in the thread, assuming that su is available is also not valid. The article should have mentioned both and that it depends on the distro.
Quoting:As mentioned earlier in the thread, assuming that su is available is also not valid. The article should have mentioned both and that it depends on the distro.


Exactly.
krisum you bring a good point, can we list distros that sudo (no root password) by default that is not *buntu (connecting to ubuntu repos make it ubuntu for all functional purposes)?

I'll even start:

1: OLPC
@azerthoth 2: DSL 3: TRK
> Why would users be expecting to run sudo if it is not already configured?

Because someone came up with a list of best Linux commands and included it?

> ...if neither sudo is setup nor they know the root password then they cannot run commands with root privileges at all.

Correct.

> The article should have mentioned both and that it depends on the distro.

What Caitlyn said. :)
4. 64Studio (which IIRC is switching from Ubuntu to Debian with the next release)
3 entries, only 1 addition. DSL is DOA and is no longer in development, 64studio is *buntu ... what happens in the future stays in the future.

So we have a whopping 3 that sudo, *buntu, OLPC, and Tiny Rescue Kit, so far.
As enterprise distros, RHEL and SLES ship with sudo by default - they would be a bad joke if they didn't. We use SLES and don't provide the root password to SAs.
I find it easier to use sudo rather than su to root and then exiting the root shell.

In a production-server environment, sudo is essential. I always go back to the way Michael Lucas explains all you can and should do with sudo in "Absolute OpenBSD." I hope he repeats that information in "Absolute FreeBSD," but since one is woefully out of date and the other slightly out of date - and both out of print, I'll just say that smart admins know how to wield sudo to allow for extremely fine-grained permissions with multiple users across multiple systems.
@herz, kind of looking for ships with sudo instead of su as the default upon installation. My RHEL systems at work do not use sudo for any maintenance, mind you exactly 2 people have access, and only I am the only *nix literate user.

@herz&steven, what is done after the fact, and I agree a savy admin can use sudo with precision, is not the point at the moment. As of now, we have garnered 3 distro's that have subsumed root into sudo, *buntu, olpc, and trk. This is hardly a resounding affirmation of most common practice.
Don't forget OpenBSD. Would a system aimed at greater security ship something that was opposed to that goal?
Quoting:Don't forget OpenBSD. Would a system aimed at greater security ship something that was opposed to that goal?
Well, that's all fine and good, until you install anything from Ports. Which, if you want a usable system, you'll have to.
I had a full OpenBSD desktop system with Xfce, and the only things I had to bring in from ports were Opera, which is basically a link to the Linux binary, Flash for Opera, also a link to a binary, and the ultra-painful Java, which was a port, required many manual downloads, hours of compiling and inevitable failures.

Other than Java, I was able to get everything I needed from packages.
Quoting:sudo is not root.


What's all the fuzz about? The article doesn't say so in the text you quoted it seems to me.

It says 'root privileges', which is about thte same as root read / write perms. To 'change environment' sudo has nice options such as '-H'.

Apart from that, EBNF is fun.

Post a comment

A free account is needed to post. Write your comment here first: your text is kept in this browser while you sign up or log in, and is waiting for you when you come back.

Your message:
|||||
10
Markdown: **bold**, *italic*, [text](https://link), - lists, > quotes, $x^2$ for math. Formatting help

Sign up and post (it is free)  or  Log in and post