Quantcast
Channel: The Techno Blog of SeedBoxers | Le blog techno de SeedBox » Software Development
Viewing all articles
Browse latest Browse all 16

Comfort On The Command Line

$
0
0

First Steps

Intended Audience – Beginning *nix user

This is the first of a series of articles on getting comfortable with the command line. Though most modern day OS’s have some type of GUI, the command line remains an incredibly powerful tool for those who know how to use it. In this article we’ll be focusing on the very basics of the CLI (command line interface).

Preliminaries

A few useful things to know about the command line, and *nix in general.

The notation program(section) is used to indicate a section and page in the system manual. The system manual has several sections which appear in parentheses next to the name of the command, thus if you see this:

tmux(1) – you know that more information can be retrieved from the system by typing:


$ man 1 tmux

For example, to learn more about the system manuals, you can type:


$ man man

Which will load the manual page for the man(1) command. Section 1 generally refers to general commands, but this varies from system to system. The man(1) manual page will clarify the sections for your particular system. The manual system on most *nix systems are quite extensive and even include sections on programming the system. To move around inside a man(1) page, you can either use the arrow keys or the j(down) and k(up) keys, q will quit, and space will jump down to the next page. As a piece of historical trivia the system manuals are called “on-line” manuals since they were available directly on the system you were connected to. This was before Al-Gore invented the Internet, so on-line had a slightly different meaning. Back then, on-line was considered anything that was available on the system that didn’t have to be loaded from offline storage, such as a tape.

The notation $ specifies that we are on the command line of a non-root user. For example, when you see something that looks like this:


$ man tmux
$ ls -l
$ cd ~/

You know that you should execute those commands as a non-privileged user.

The notation # specifies that the commands are being run by the root user:


# rmdir /tmp/data
# vi /etc/hosts
# reboot

In general, the commands following the # will not work as a non-privileged user, and so you should run them as root, either directly or via a call to sudo(8). These conventions hold in almost all writing about the *nix command line.

Getting Started

So, you’ve just booted up your shiny new *nix system, and have logged in to your fancy GUI. Now what? How do you find this command line you’ve heard people talk about? In many of the popular GUIs you will see an icon that looks like a computer screen. A google images search for “*nix terminal icon” will show you many examples. Find that icon if you can and click on it. This should open up an instance of your terminal program, and you should have a nice window with something like this inside it:


gguzman@myhost:~$

And a little cursor. Type:


$ man man

And give that a read.

-G. Guzman


Viewing all articles
Browse latest Browse all 16

Latest Images

Trending Articles



Latest Images