| |
Learning the Command Line
This list is focused on helping people learn how to use a command line interface. You may have seen or heard about the shell, sh, bourne, prompt, terminal, console, Bash, scripts or even batch files. I hope the following links will help fill in the gaps between what you know and what you want to learn.
The main URL for this page is https://www.grantbow.com/command_line.html.
It was started in October 2011. Thank you to
all the contributors who have helped me keep this page updated.
Email is encouraged to Grant Bowman
<grantbow@grantbow.com>
Editing a web page on a web hosting provider is a common need. Putting together a few things described here makes this quick and easy.
- Find the terminal on your computer and issue the command
ssh user@host . A password or ssh key will authenticate you. Then you are given a prompt.
- Type
$ screen to keep the connection alive if you are disconnected. This also allows running multiple terminals simultaneously.
- This will look like nothing happened but something good happened.
- The code to make screen pay attention is <ctrl-a>
- So the command to get help from screen looks like <ctrl-a> ?
- Type basic commands like
ls -l , and cd to determine what file to edit. The pages of your website will be arranged just like the files of your website.
- Type
vi <filename> to edit the file.
- This editor uses modes. Move around in the file using
hjkl , delete characters with x .
- insert using
i to begin inserting characters in insert mode.
- Return to normal mode using
<esc> .
- A colon starts a command you can type instead of a single character. Save the file with
:w .
- Verify results by reloading the web page in your web browser. Congratulations!
I stand on the backs of giants in talking about command line computer use, especially my
favorite interpreter, BASH available on many platforms.
I am very grateful to be working with Dreamfish and
thankful to participate in the libera.chat
IRC Network.
A script is simply a text file with commands in it. It is run as if you were typing them. It is real programming. Here is the canonical example:
#!/bin/bash
echo "Hello World!"
How about 2>&1, what kind of magic incantation is this?
These are called file descriptors.
0 means standard input, 1 means standard output and 2 means standard error.
So copy the errors to the address of the output.
Then you can write to a file with > file.txt or append to a file using >> file.txt
First Commands
Finding the Terminal!
Next steps
| Link | Comments | Updated |
| LDP Tools Summary |
An overview of command line tools. | 20111101 |
| UNIX Shell |
The scoop stright from S. R. Bourne himself circa 1978. | 20230829 |
| Bash Tutorial |
Bash Tutorial online guide. | 20111009 |
| online tutorials |
A nice list of online tutorials with descriptions and ratings. | 20111009 |
| Paoli's Intro |
My friend Michael Paoli met critical training needs at his work by creating materials, organizing and leading
training shell and security classes when they were needed.
Feedback from class participants and managers was very positive; most considered it much
more valuable than expensive and much more time consuming vendor courses.
An oldie but STILL one of the best resources for learning the shell is the
Bell Labs 7th edition man page Part 1 PDF (especially sh(1) on page 158) and Part 2 PDF from the UNIX PROGRAMMER'S MANUAL, Seventh Edition, January, 1979. | 20230829 |
| Jim's Intro |
My friend offers a wonderful page of notes from a two day training course he taught. Many of the links in his Appendix were helpful. | 20111009 |
| Bash by example, Part 1 |
IBM Developerworks presents a series in three parts. Part 2 and Part 3 make up the rest. | 20111009 |
| Advancing in the Bash Shell |
Some nice tips to know and learn after you get going. | 20111009 |
| Shell Scripting |
An online tutorial and a book Shell Scripting
and a book written by Steve Parker and published by Wiley. This was recommended on the svlug.org email list. | 20111009 |
| In the beginning... |
In the Beginning...was the Command Line is an essay written by Neal Stephenson. | 20111009 |
| Index of bash commands for Linux |
A useful index of commands. | 20111009 |
| Bash Home |
The GNU BASH home page itself. | 20111009 |
| Scripting Tutorial |
Linux Shell Scripting Tutorial online guide. | 20111009 |
| 10 Seconds Guide |
A quick reference list of commands that takes a few more than 10 seconds. | 20111009 |
| lookuptables.com |
A nice quick reference site for ASCII codes & HTML. | 20111009 |
| Shelldorado Links |
An impressive list of more advanced links. The site is well worth exploring for scripts, articles and tips. | 20111009 |
| Shell Scripts |
After interactive is shell scripts from A quick guide to writing scripts using the bash shell. | 20111009 |
| Learning the Unix Operating System |
The "owl book" is a great printed introduction to Unix and Linux. The entire O'Reilly series gives lucid and precise overviews of many topics about Bash and related topics. I recommend at least considering books published by O'Reilly if they are available for the topic you are interested in. | 20111009 |
| Easy Linux Commands |
A book written by Jon Emmons and others published by Rampant Techpress. | 20111009 |
| The TTY Demystified |
Introductory article about the connections between the hardware and unix processes. | 20190706 |
| Decoded: GNU coreutils |
Guide to reading the source code of the most used unix commands. | 20190706 |
| repl.it |
Online IDE.
wikipedia,
google: Neoreason Inc,
angel.co,
cb,
linkedin,
tc from 201803,
github
| 20190821 |
| codeacademy.com |
wikipedia-codeacademy,
google: codeacademy
| 20230817 |
| AI while Programming |
how can I use ai while programming? great results.
| 20230817 |
Please email inquiries & suggestions to Grant Bowman <grantbow@grantbow.com>
Last update: 20230829
|