The Linux Command Line

I’m seeing a few people in various norns threads struggling with the command line. Thought I’d throw up this resource for anyone who wants to learn the basics of moving around and making changes via command line. You should only need the first few chapters to be able to navigate your norns but further reading can only be helpful if you’re interested in this ecosystem.

It’s a free 500+ page book that has easy to follow examples.

http://linuxcommand.org/tlcl.php

22 Likes

It may not look very exciting, but honestly, it’s quite a bit of fun once the light bulbs start turning on.

9 Likes

Also, if you happen to be a Mac user, a lot of knowledge gained in this way translates fairly directly to the Terminal app!

7 Likes

Once you have an overall view on what the most common command-line utilities do, it’s easy to google the specifics. I’ve been using the Linux shell for more than 20 years, but I still google command-line options of the various commands all the time.

Also, Linux Journal has small command-line related features often, which make great quick reads: https://www.linuxjournal.com/tag/command-line

4 Likes

Learning to navigate the filesystem and view text files first as a good starting point.

Also, reading the man pages is invaluable. I try to do that before googling if I know the command.

While Norns is running linux, a lot of these skills are really Unix skills (which Mac OS is a flavor of). Inspirational Unix video which includes a great command line talk with Brian Kernighan:

6 Likes

tldr is a great helper for all things command line. It provides simplified man pages with examples for the most common use cases.

6 Likes

indeed, Darwin is a BSD operating system

1 Like

This site offers some command line ‘recipes’, if you will.

https://www.commandlinefu.com/commands/browse

1 Like

“C is a very nice high-level language.” Wow it really is turtles all the way down, huh. :joy:

9 Likes

And if you can’t remember the command, apropos is a good one to remember:

$ apropos beat slicing          
                                                                                                                                                        
aubiocut (1)         - a command line tool to slice sound files at onset or beat timestamps
aubiotrack (1)       - a command line tool to extract musical beats from audio signals
debug_heartbeat (n)  - debug narrative - heartbeat
gnutls_heartbeat_allowed (3) - API function
gnutls_heartbeat_enable (3) - API function
gnutls_heartbeat_get_timeout (3) - API function
gnutls_heartbeat_ping (3) - API function
gnutls_heartbeat_pong (3) - API function
gnutls_heartbeat_set_timeouts (3) - API function
slicing: nothing appropriate.

4 Likes

I’ll second this resource as being excellent, it’s been one of the primary ways I’ve learned the command line

1 Like

a couple of tricks for bash to make life easier on the command line:

  • increase HISTSIZE and HISTFILESIZE env variables, to have a longer command history
  • use CTRL-R to search in the command history (even a partial substring works)
  • “cd” without a directory name, to go back to home
  • “cd -” to go to the previous folder
2 Likes

what do we know about audio on the command line?

http://sox.sourceforge.net/
https://opensource.com/life/16/8/3-command-line-music-players-linux
https://www.thegeekstuff.com/2009/05/sound-exchange-sox-15-examples-to-manipulate-audio-files/
been rockin’ sox to play .wav files, it works good
:slight_smile:

1 Like

Agreed, sox is so useful! I use it for lots of things but probably the most for basic stuff like rate conversion and conversion to other audio types. The cli interface is a little odd but becomes familiar. It can do tons of stuff, the man page is overwhelming! On the same token ffmpeg is a very full featured cli audio tool.

My favorite audio player is moc

mocp

The one thing that both sox and ffmpeg lack are quick-view graphical waveforms or spectrographs in the terminal. They can both generate spectrographs but I’ve always thought it would be really nice to have a one-command way to get a crude look at the shape of a handful of sounds without having to generate the image and view it in another program. I do a lot of rendering work on a remote (well, on the other side of the room) server via ssh so something that drew into the framebuffer would be really neat…

3 Likes

Damn I was just about to suggest this site :slight_smile:

primarily: doing quick/dirty conversions for work-in-progress files with ffmpeg.

ffmpeg is your friend, and I’ve amassed a slightly alarming amount of knowledge about it in the past few years. It’s not just for video, folks.

3 Likes

I was just chatting with Claude Heiland-Allen on mastodon about text mode waveform viewers last night… and he just wrote one: https://mathr.co.uk/harry/ (!?!)

This looks so useful!

6 Likes

Whoa - that would be handy when working with sox on the command line.

1 Like