What are your favorite command-line programs?

33 réponses [Dernière contribution]
pragmatist

I am a member!

Hors ligne
A rejoint: 03/03/2016

Following on this thread: https://trisquel.info/en/forum/whats-your-favorite-not-so-famous-application-trisquel

I thought it would be interesting to hear specifically about what CLI programs people like.

editor: emacs

terminal: gnome-terminal

text-browser: lynx

email: alpine, mutt

package management: apt

wireless: wicd

ADFENO
Hors ligne
A rejoint: 12/31/2012

Package management: aptitude

Multimedia conversion and recording: avconv (from "libav-tools" package)

Multimedia playing: avplay (from "libav-tools" package)

Magic Banana

I am a member!

I am a translator!

Hors ligne
A rejoint: 07/24/2010

The basic GNU text-processing commands (I work with large logs): less, head, tail, cat, tr, wc, cut, paste, comm, join, sort, uniq, grep.

And GNU AWK is wonderful when simply piping some of the commands above does not do the job.

I use GNU make a lot too. To build my C++ programs but also my LaTeX documents (including slideshows with Beamer).

loldier
Hors ligne
A rejoint: 02/17/2016

apt-get install
youtube-dl
wget
dd
nano

onpon4
Hors ligne
A rejoint: 05/30/2012

I mostly use graphical programs, and when I do use a command-line program, it's usually only because there's not a graphical equivalent. The one exception is Nano, my preferred command-line text editor; I prefer to use Nano for entering commit messages.

pragmatist

I am a member!

Hors ligne
A rejoint: 03/03/2016

Trying to use GUI programs whenever possible is perfectly reasonable.

It has been an off-and-on project of mine over the years to develop a large enough repertoire of CLI programs so I could in theory go without X Windows. Obviously, for things like presentation software, or pictures, or videos, etc... I'll need to fire up X Windows.

As for aesthetics, I actually like ncurses and the like. It reminds me of a bygone era of monochrome CRTs and 5.25" floppies and even the dreaded DOS!

The most important reason I like CLI programs, however, is I often find them clean and fast and more robust.

The reason for this thread, from my point-of-view, is that many times people suggest interesting alternatives I would not discover on my own. For example, you kindly recommended elinks in a thread where I mentioned lynx. This is not something I would have looked for, however, since I'm happy enough with lynx. Still, I immediately installed it on your recommendation and I'm glad I have a more user-friendly alternative. Thanks again!

Dare I ask what you mean by "commit messages"?

onpon4
Hors ligne
A rejoint: 05/30/2012

> Dare I ask what you mean by "commit messages"?

For things like Git and CVS.

lembas
Hors ligne
A rejoint: 05/13/2010

top (cpu usage) and iotop (I/O usage)
ncmpc (music player daemon client)
alsamixer

flac, ogg, and mp3 encoding
transmission-cli

One funny cli related thing if you haven't tried it yet is to try the ascii video output

And if you wish to ditch X and still see pictures there's fbi which uses framebuffer

Plenty of scripts, I think incron deserves a special shout out here because it allows you to easily monitor file system changes instantly and without polling. And since in UNIX-likes everything is a file...

Turtleman
Hors ligne
A rejoint: 05/22/2013

I don't know about my favorite, but based on .bash_history here are what I use most:

Various scheme implementations (scripting, calculator)
emacs (text editing)
git (version control)
xelatex (latex processor)
ssh (remote shell)
apt (package management)

Other cool programs:
fortune (displays a random quote)
roll (dice simulator)

lembas
Hors ligne
A rejoint: 05/13/2010

One silly thing that often makes me laugh is having "fortune -s" (for short adages) in my .bashrc, which means that every time I pop open a terminal window I'm greeted by a fresh fortune. :)

Also, irssi is a fairly sweet IRC client.

Turtleman
Hors ligne
A rejoint: 05/22/2013

Yes, I have that enabled! I actually maintain a repository of politics-related quotes for fortune, so I specifically show those.

hack and hack
Hors ligne
A rejoint: 04/02/2015

Oh, nice ! Thanks !

hack and hack
Hors ligne
A rejoint: 04/02/2015

I'm still trying to figure out which ones I like the most, and whether I like CLI or GUI better.

But sticking with CLI programs, I really like Ranger. I still have Thunar on the side because I didn't learn the commands to create, copy, paste stuff without destroying everything. But browsing through text files and images is so fast and convenient that unless there is a fusion of both programs, Ranger is a keeper.

it has Vim basic keybindings, and since Vi is by default on all OS, I've chosen Vim as a text editor. Probably overkill, and I'll merely gain seconds, but it's still a tiny bit faster and convenient than a classic text editor.

Fortune, I love that one too, I use it to display quotes on my Conky.

Cmus was nice for the Vim keybinings. But I'm not sure I need a dedicated music player.

Tmux looks cool when using it without X, but I didn't went there yet (if ever).

Also htop, even if I use it as a basic ctrl+Alt+Del when I forget I gave xkill or killall.

And urxvt as a terminal.

Magic Banana

I am a member!

I am a translator!

Hors ligne
A rejoint: 07/24/2010

I personally spend most of my time in a text editor: programming, writing documents (in LaTeX), presentations (in Beamer LaTeX), etc. The time I have spent, for 12 years ago, learning Emacs have paid off at least a thousand time!

And you can do more with Emacs: read/write emails, visit the Web, read RSS feeds, manage your files, etc. As far as I know, vim cannot do that. However, I would write that the main reason to prefer Emacs to vim is that its learning curve is far less steep. Give the layman a terminal with vim running, he will only manage to make beeps! He will not input any text nor be able to cleanly quit the program!

hack and hack
Hors ligne
A rejoint: 04/02/2015

I'm willing to try Emacs for some time now.
I totally like the idea of "one way to do everything".
There's even the evil mode to get vim keybindings, provided it's used along Ranger (if preferred to the internal way to manage files).

After all, what are the advantages of Vim for me (compared to a normal text editor, not to Emacs)?
I mainly like the keybindings that are the same for several programs. And the modal aspect to move around is fun.

I think the only real downsides are a slower startup (we're probably talking about a couple of seconds, which is meaningless), and the keybindings that are supposedly hard on the pinky finger (maybe the only real reason not to favor Emacs). And the "need" to get acquainted with vi basics, just in case. But since I roughly have those basics already, it's also a moot point.

Speaking of which, yeah, Vi(m) is horrible when using it the first few times. I merely can move around now, write, save and quit, but I had to learn those the hard way, and many other basic actions I can't perform yet.

So for my use, it really could be any of those two editors.

Emacs is without a doubt more powerful. It's supposedly less intuitive, I'll have to find out for myself (specially since Vim doesn't feel intuitive at my level).

Thanks for the suggestion!

Magic Banana

I am a member!

I am a translator!

Hors ligne
A rejoint: 07/24/2010

I mainly like the keybindings that are the same for several programs.

Terminals usually use Emacs' keybindings by default: C-b (one character backward), C-f (one character forward), C-t (to transpose, i.e., swap two characters), C-d (to delete one character), M-b (one word backward), M-f (one word forward), M-t (transpose two words), M-d (delete the end of the word; M-backspace to delete the beginning), C-r (reverse search, i.e., search the history in the terminal), C-p (to go to the previous line, i.e., the previous command in the history in the terminal), C-k (to kill, i.e., cut from the cursor to the end of the line), C-y (to yank, i.e., copy what was cut), C-a and C-e (to go to the beginning/end of the line), etc.

Notice that, contrary to vim, Emacs' keybindings "make sense": the letters usually mean something and Meta (Alt on most keyboards) usually allows to apply an action at the level of words when Ctrl was used to apply it at the level of characters.

I think the only real downsides are a slower startup (we're probably talking about a couple of seconds, which is meaningless)

What takes that time is to start a graphical window. 'emacs -nw' executes Emacs in the terminal (of course, -nw is not needed if 'emacs' is executed in a "real" terminal). And then there is 'emacsclient' to tell a running Emacs to open a file (rather than running Emacs several times).

the keybindings that are supposedly hard on the pinky finger (maybe the only real reason not to favor Emacs).

That is true if you know how to type on a keyboard, which I do not (I mainly used my index and middle fingers and thumbs for Space, Ctrl, Alt and Shift). A colleague who knows how to type remapped Caps Lock to Ctrl (if I remember well).

It's supposedly less intuitive

I disagree. Modes are not intuitive in my opinion.

hack and hack
Hors ligne
A rejoint: 04/02/2015

Frankly, I prefer moving around with the modal way. I'm a touch typist though (not a good one, but still).
I don't like holding modifiers. Actually, I still don't understand all the differences between a Windows vs a GNU/Linux one. The Caps Lock doesn't work with numbers unless configured that way (I think it's for all caps with accents), but it's not comfortable to type numbers on a laptop keyboard while holding the modifier.

But using modifiers or not is trivial with evil-mode. Best of both worlds, specially for a beginner like me. I mean only super advanced user with deeply molded habits are going to complain about a specific missing feature or another. Worst case, I'd use both when I'll be that good.

I tried the non-GUI version, and it's indeed as fast as it gets. Cool.

Well, what do you know, I'm an Emacs user now (and I'll use command line keybindings from now on), thanks to you :)

Magic Banana

I am a member!

I am a translator!

Hors ligne
A rejoint: 07/24/2010

The advantage of running Emacs in a graphical frame is that you can display images in it (I sometimes edit some SVG by hand and want to see the result: C-c C-c) or, even more useful for whoever write documents, PDFs (I split the screen vertically with C-x 3, have the LateX on the left, the PDF on the right). In a real terminal, you can use the mouse (after installing the "gpm" package) but you cannot do so in a terminal emulator (i.e., in a X session). The mouse is sometimes convenient (e.g., to correct typos while rereading).

hack and hack
Hors ligne
A rejoint: 04/02/2015

I personally use Libo (Libreoffice) Draw for PDF editing.
I see there's an Inkscape integration with Emacs in the works. You seem to need SVG edition for text (LateX), so you probably don't need this much.

In the end, it's all a matter of workflow. I've read about professionals in different fields who use a suboptimal but perfectly working workflow, out of habit, and because their focus is on the work to be done, not on the way to do it anymore.

But Emacs looks too interesting to ignore, I can't help it :)
And I'm convinced it can only pay off.

Magic Banana

I am a member!

I am a translator!

Hors ligne
A rejoint: 07/24/2010

I see there's an Inkscape integration with Emacs

No, there is not. But Emacs can depict SVG. And it can show the XML behind the picture so that you can edit it by hand.

You seem to need SVG edition for text (LateX)

As far as I know, LaTeX document cannot directly include SVG graphics. But SVG can be converted to EPS or PDF (e.g., with Inkscape), two other vectorial formats. If compiled with 'latex', the document can include EPS graphics. With 'pdflatex', it can contain PDF graphics.

But I also use SVG to visualize data. I sometimes write scripts that output such SVG graphics.

hack and hack
Hors ligne
A rejoint: 04/02/2015

What about this? https://www.emacswiki.org/emacs/Inkmacs

It's more for you, I don't really understand SVG editing through text, and even after reading, I don't really get what Inkmacs (or even XML editing) does.

Speaking of which: about my LateX comment, it was just a bad assumption about the way I thought you worked with SVG (which I know only through Inkscape, hence my complete ignorance).

Magic Banana

I am a member!

I am a translator!

Hors ligne
A rejoint: 07/24/2010

OK. Then there is (well, "will be in the far future" according to https://github.com/jave/inkmacs) an integration of Emacs and Inkscape then.

SVG graphics are text files. Like Web pages are text files (try Ctrl+U in Abrowser or Icecat). You can edit them with a text editor. Just try to "open" an SVG file in any text editor and you will see (if the editor in question is Emacs, it will show the image and C-c C-c allows to switch to its textual representation).

The description language used to describe an SVG image is a specialization of XML (the grammar the text must respect for the viewer to interpret it as an image).

hack and hack
Hors ligne
A rejoint: 04/02/2015

I know for example that I can draw in css (canvas), maybe it's the closest thing I know to what svg manipulation through xml can be, from what I read.

My instinct tells me to just draw in inkscape, yet I can imagine its usefulness in generating graphics from (proportional?) data, or something. Anyway, I'll look further into that, looks interesting.

Magic Banana

I am a member!

I am a translator!

Hors ligne
A rejoint: 07/24/2010

SVG actually is the format that the Web uses for vectorial graphics. And, again, I am talking about modifying an SVG graphics by editing it with a text editor. Just try to open a simple SVG file (https://upload.wikimedia.org/wikipedia/commons/1/1a/SVG_example_markup_grid.svg for instance) in any text editor, change some number or some color, save, and visualize the result (with a Web browser for instance): the image changes!

Many formats (not executables, raster pictures, sounds and videos though) actually are text files that the related program interprets. Some formats (such as SVG) is one single text file, other formats are (compressed) set of text files. Try to open any OpenDocument (LibreOffice's format) file from the "Archive Manager" for instance. It will show you several files. One of them is named "content.xml". Open it in a text editor and you will see in plain text the content of the document. And guess what: its "grammar" is a specialization of XML too!

LibreOffice reads/writes those text files ("interprets visually" would be a more precise wording than "reads"). Inkscape does the same with text files that represent SVG graphics.

pragmatist

I am a member!

Hors ligne
A rejoint: 03/03/2016

If you are going to have only one console-based editor it should be Emacs. The first thing I do after installing Trisquel is download and install Emacs. Why is it not installed by default on Trisquel?

As long as Emacs is not installed by default, you need to also know nano (although you don't need to know much since the commands are labelled right in front of you.).

If Emacs were installed by default, you wouldn't need to know how to use any other editor.

Sometimes you will find yourself in vi by accident. So at the very least everybody should know how to exit it!

:q!
(type first a ':' then 'q' and then '!' and hit 'Enter')

That is like preferring Spanish to English, but at least knowing a view key words of English anyway, like "help" or "don't shoot" :p

Magic Banana

I am a member!

I am a translator!

Hors ligne
A rejoint: 07/24/2010

If Emacs were installed by default, you wouldn't need to know how to use any other editor.

You do not. You only need to know 'sudo apt-get install emacs'. ;-)

Even if I never use it, I think GEdit is a better choice for Trisquel, which targets the mainstream public. More advanced users know how to install Emacs from the package manager anyway.

pragmatist

I am a member!

Hors ligne
A rejoint: 03/03/2016

I agree with everything you said. Still, it does not explain why vi is installed by default and Emacs is not?

Magic Banana

I am a member!

I am a translator!

Hors ligne
A rejoint: 07/24/2010

Maybe because it is in the "Single UNIX Specification": https://en.wikipedia.org/wiki/Single_UNIX_Specification

jstoddard
Hors ligne
A rejoint: 05/01/2016

If I'm working without a GUI at all, then screen is an absolute necessity. After screen comes:

Emacs for an editor
Alpine for mail
ELinks for web browsing

Something like ogg123 for music -- I'm not sure, since I haven't played music from the command line for some time now. Also, some time ago I used to play video from the command line with mplayer.

And, of course, several of the games from the bsdgames package.

JadedCtrl
Hors ligne
A rejoint: 08/11/2014

Some programs I like to use are:
cmus & sox for music
ranger for file-management (sometimes)
mpsyt for YouTube
mutt for e-mail
ii for IRC
vi(m) for text editing
aspell + latex for getting documents looking nice
sl because I can't type for the life of me :p

muhammed
Hors ligne
A rejoint: 04/13/2013

Pdf-page-grep is great for searching large PDFs. It can output a PDF that contains only pages that match the user's search definition. Magic Bananna made it:

http://homepages.dcc.ufmg.br/~lcerf/en/utilities.html#pdf-page-grep

andermetalsh
Hors ligne
A rejoint: 01/04/2013

- mps-youtube
- Inform6 + fizmo-ncursesw for IF.
- txtmap is an awesome tool to write text adventures from literally its transcription.
- imagemagick
- avconv
- emacs
- markdown

alimiracle
Hors ligne
A rejoint: 01/18/2014

editor: emacs
terminal: gnome-terminal
text-browser: EmacsWebWowser
File Management: Dired

email: gnus
package management: apt

GNUser
Hors ligne
A rejoint: 07/17/2013

Mine is curl. After that, everything I can run in a bash script to mess with html files and such. (grep, cut, etc)