10

I have been away from linux for some years, but now I'm once again back with Ubuntu 10.04. I used to run Gentoo in 2000 and knew my commands, but now that the world of linux has progressed a bit further, aren't there many new commands to learn?

Do you know a list of linux shell commands that are in broad use now and which didn't exist 10 years ago?

Identified so far: ngrep, sshfs, pv

2
  • 1
    Just curious, why 10 years away from Linux? :)
    – takeshin
    Jul 10, 2010 at 6:03
  • Well, it started with .NET/C# and then years pass. I used Win XP all the time.
    – grm
    Jul 10, 2010 at 9:01

12 Answers 12

5

I don't know what you used in 2000. Figure out the new ones from an history meme; mine below. I expect command use to follow a long tail. The basics haven't changed, but there's a lot more to pick from.

history |awk '{print $2}' |sort |uniq -c |sort -rnk1,1 |head -n 20 |vipe
    219 ls
    100 git
     92 cd
     91 sudo
     66 <custom>
     64 aptitude
     60 locate
     54 grep
     52 less
     48 mplayer
     45 vim
     43 find
     36 cat
     31 <ssh alias>
     26 <ssh alias>
     24 dpkg
     23 file
     23 df
     21 <pgrep alias>
     20 man
5
  • 2
    You use git more often then cd. That is kind of cool. Jul 10, 2010 at 12:58
  • Tried this on my laptop. sudo, cd, vim, startx and openttd... Although what is vipe? Had to leave that bit out as it's not on my system.
    – Macha
    Jul 10, 2010 at 15:18
  • @Macha vipe is from the moreutils package, inserts an editor into the pipeline. It's OK to ignore that part.
    – Tobu
    Jul 10, 2010 at 15:43
  • @Ludwig It seems I use hg more often than anything else, it has 5x over the next command (hg: 244, cd: 48). I'm actually surprised cd even made it, as I try to use pushd/popd as much as I can.
    – roguesys
    Jul 10, 2010 at 17:35
  • For me, multiple screen windows alleviate the need to cd. And git is da bomb.
    – Tobu
    Jul 10, 2010 at 20:01
8

Actually, you probably haven't missed much. The popular UNIX reference books that were written back in the '70s (or so) are still popular and still useful - the base commands haven't really changed.

The only new thing that comes to mind immediately is the package manager; you might need to get used to the syntax of aptitude and apt-get etc., if you don't use their graphical frontends. There's also version control, i.e. svn and git are new and popular, if you are in to that sort of thing. But they're not exactly core UNIX commands.

3
  • 1
    Yea, I have been using svn for some time, but had to start with git because 80% of all the tools I'm interested in is hosted on github. Also package.el in emacs comes handy and things like zshkit and emacs-starter-kit.
    – grm
    Jul 9, 2010 at 20:47
  • Did you mean mercurial and git? Didn't the Internet agree SVN is kind of out?
    – roguesys
    Jul 10, 2010 at 17:29
  • @alexandru: No, and no, not yet. Although I guess I shouldn't have said "new and hot" - that wouldn't apply to svn, true, but it's still pretty popular among people who are not early adopters of the newest technologies (which is a lot of people, especially in business). For example, there are more [svn] questions on SO than [git] questions.
    – David Z
    Jul 10, 2010 at 17:36
5

A big difference is now a very comprehensive aid in bash-completion. Makes it a lot easier to use command line.

1
  • 1
    Yea, I noticed that, but a bit too late. Had already switched to zsh because of completion. :)
    – grm
    Jul 9, 2010 at 20:45
5

You're not going to find much different. A few options here and there. For the most part, especially on systems like Ubuntu, you're going to find that most of the new stuff is GUI.

Concerning new commands, if you are a big of a screen fan as me, you may appreciate the new tmux or byobu.

I had to go back and check on the release dates of a lot of things... Looks like wget (1996), curl (1997), and iptables (1998) were all out a few years before 2000, so those might not be new to you.

5

pv - Progress bar for long commands

pv is probably new to you. It provides a progress bar for any program that can accept input from a pipe.

To install (Ubuntu)

apt-get install pv

Example

Show progress as you caclulate a checksum for a large file:

pv large_file | sha1sum
2

ls, cp, dmesg, cat, grep, etc. Something shouldn't be changed for ages :), so in base commands you haven't missed nothing.

1
  • 1
    The one change that I really enjoy is grep -r directly instead of combine it with find.
    – grm
    Jul 9, 2010 at 20:46
2

Only main change (apart from desktops replacing raw X11) is probably repositories.

So the 'apt-get' syntax on Ubuntu (and similar rpm on Redhat)

1
  • Nothing today that is more fun than gentoo back in 2000 (IMHO), well, except for Sabayon, but haven't had time to play with that yet.
    – grm
    Jul 9, 2010 at 20:49
1

Not a new command but used much more often these days:

ssh and sftp

They allow for encrypted communication.

1

ngrep was around ~9-10 years ago, I'm pretty sure of it

pv is not a command, it is a CLI app. You have to install a package for being able to use it.

sshfs is not a command, it's a generic name for a network filesystem

You claim to be a gentoo user, yet your question is stated in a "send me codez" manner. It looks like it's asked by somebody who thinks that knowing command names is the silver bullet. No, using your brain is the silver bullet.

I strongly recommend you to read (again, even if you already did it before) How To Ask Questions The Smart Way, because I think your question certainly doesn't meet those standards.

If I would have to compare Linux today and Linux 10 years ago, I would emphasize the following main differences:

  • access to internet is widely available now, even in some not very developed countries. This is a double edge sword: the amount of sane and adequate tech guys has increased greatly, but the percentage of them among all internet user has decreased. If you learn to avoid people that don't share your interests and hang with people that share common interests with you, you'll learn a lot from them. Even StackOverflow/ServerFault/SuperUser sites illustrate this perfectly.

  • much more people are writing free software. If 10 years ago sourceforge and freshmeat were unique and SVN was the king of version control, today we have github, launchpad and bitbucket, we have a lot of distributed version control tools, we have a huge amount of communities developing software or simply exchanging knowledge. Today, if you need free software for a certain particular task and you are being persistent enough, there are high chances that you will find something that suits you perfectly. Or something that suits you "almost perfectly" and you will end contributing and giving back to the community.

Edited to include the answer to your question from the comment:

I wonder what in particular you didn't like with this questions and how could I improve it?

I didn't like that your initial question is way too general.

Usually you try to complete a particular task, you try to achieve a very special goal. You try it one way, you try it another way, you go to review some man pages and still fail. This is the moment when you go asking for help and advices. You describe your workflow, the expected result and what you actually get. Don't be ashamed to admit that you tried something and failed. People are generally nice and helpful, most of them won't point fingers and tease you, most of them won't downvote you for failing. Some of them will even warn you about a poorly stated question, accepting the risk to be downvoted themselves for pedantry :-)

Stating your workflow is useful for a couple of reasons:

  • readers of your question have to make less assumptions, because they would already know you tried X, Y, Z and it didn't work
  • the way you state your question allows others to estimate your level of knowledge and provide an answer that would be easy for you to understand

Here are a couple of situations:

  • you need to use a sniffer to debug a networking issue. You try tcpdump (which btw was the standard 10 years ago and nowadays shares the title with wireshark), you find its output too cryptic, its default values of options not very user-friendly. Somebody suggests you ngrep, you run it, you see that it provides more user friendly output by default and you learn a new thing.
  • you do cp -a to copy a big directory, you want to see progress and you need to stick to command line, not even midnight commander is available. You read the manpage for cp and you fail to find the proper options. Then somebody tells you about pv.
  • you aren't happy with ftp, because it transfers the data without encrypting it, you also want to edit files "remotely". Somebody tells you about sshfs, which "maps" a remote directory to your local filesystem over an encrypted connection.

See, these are your ngrep, pv and sshfs. Is there a difference between your general questions and my scenarios? Certainly yes. I will try to explain why. So you asked people to tell you about cool commands. You got 3 answers. Someday you might need to use a sniffer. And you will probably remember this question and will use ngrep. What if you get 1000 answers suggesting 1000 new commands? Don't you thing that a huge part of them will just slip through your memory for a short time period, then you'll forget about them? That will certainly happen, because when you gain new knowledge, you need to practice applying it, to get experience. Frankly, your initial question reminds me the situation when a kid tries to learn martial arts by looking at pictures in a book :-)

1
  • 2
    Thanks for your opinion and advice. As I wrote I have been away for some time and interested in picking up something new and was puzzled with this question. I wonder what in particular you didn't you like with this questions and how could I improve it? When it comes to ngrep, thats a new command for me. I used to work with tcpdump, but in most cases I find the addition of ngrep much more convenient.
    – grm
    Jul 10, 2010 at 11:36
1

Autojump: http://wiki.github.com/joelthelion/autojump/

Instead of cding through the whole hierarchy, just type j tha and go to /data/projects/That_very_important_folder.

0

That's a good question with not a great answer. As zaynyatyi noted, the old friends are still there. What is most impressive and daunting are the sheer number of facilities that have been built on the infrastructure. For example, X windows is still the same, and xeyes works the same as it always did. But then there's Gnome and DBUS and Metcity and GTK and a hodge-podge boot sequence that makes SVR4 rc?.d look almost rational.

The most useful thing that is new to me - who cut my teeth on V7/BSD4.1 - is locate(1).

0

One that I didn't realise for a bit was less - the joke name being "less is more". more is still there, but less is better. I think it's been around a fair bit more than 10 years, though - it just wasn't there (I think) when I was at college in the early 90s. That or maybe I just forgot.

Not the answer you're looking for? Browse other questions tagged .