This is a series of five articles treating about GNU/Linux command line interface as a great way of both exploring and simply using this operating system. It covers basics features of the CLI including file management, pipes, streams, redirections, regular expressions, system variables and more.
Ah the *nix console, what a lovely place to be.
Yep. I spend most of my day in the Unix console (Solaris 8, 10 and Linux), running from SecureCRT on my Windows XP notebook.
Too bad I can’t have Linux as my main desktop. It will take the corporate mentality a while longer to get to that point.
Ah, being able to switch back and for between the *nix console and GUI apps depending upon what is the best tool for the particular job. What a lovely place to be. 😉
The real UserInterface
“The real UserInterface”
Don’t get me wrong!
Console is the real UserInterface to the system in *nix;
Unlimited numbers of C.L.I./Consoles on Top of X+WindowMangers(+Compiz Fusion )
Edited 2007-10-05 21:25
When you can also try to learn stuff in a more system-independent fashion . This is still work in progress, but covers Linux, FreeBSD, and Solaris:
http://kajero.com/books/unixsystems/html/
I regularly check stuff on NetBSD too (but it’s barely doable to cover every system).
Edited 2007-10-05 18:27
Nice introduction, perhaps will use this to teach some kids about the unix world.
How to use the Linux console
Step 1: Install http://en.wikipedia.org/wiki/Yakuake
Step 2: Profit
No thanks, I would very much prefer to use the following combinations:
1 – (The best to me) gnu screen + rxvt-unicode;
or
2 – (very, very good) mrxvt (0.5.3) + dtach;
Nothing beats the pleasure of be able to detach your section from a particular terminal and come back to it later while everything keeps working in background.
And for gnu screen 4.0.3 there is a patch (“http://savannah.gnu.org/bugs/?19805“) to “correct” the altscreen default behaviour.
Hope the author will publish also the basics of shell programming (not that it is hard to find something on that matter). This is what really makes *n[iu]x so powerful to administrative tasks.
For those gnome users that would prefer to keep the qt libs off of their system, you can install tilda:
http://tilda.sourceforge.net/wiki/index.php/Main_Page
flashy scroll down terminals get really old when you routinely have > 10 terminals w/ tabs open at once though. Their novelty wears off unless you don’t spend much time in the CLI.
In the article the author states “Console – a system administrator’s terminal”, which is true for consoles that are terminals, but untrue for consoles from the “old fashioned days” when mainframes were big; then, the console was a board with switches and lights used to indicate machine status and of course to boot the machine. It is where the operator 1st class (OP1) works. Next to the console, a teletype class device was used for maintenance and administration interaction. Later on, these two facilites merged into a kind of terminal which then was the console. Another term for the same device is BSP (Bedien- und Serviceprozessor), very famous term in Germany.
This is how a console looked like:
http://www.robotrontechnik.de/bilder/Grossrechner/ESER/EC1040/EC264…
(The EC2640 is the CPU + console of the EC1040 installation.)
IDBF05W MACHINE ERROR. RELOAD OC/EC 🙂
I added this note because the author mentioned historical termini technici in order to make clear where the used words come from.
The article was interesting to read, allthough a professional UNIX / Linux user won’t find anything particular new in it. But it’s still worth to be mentioned as a good introduction and starting point to UNIX / Linux basics of efficiency, comfortability and flexibility – which you usually won’t find in many GUI applications. If it’s up to real work, CLI is your friend if you’re smart enough. 🙂
Linux distro’s have actually shielded or dumbed down the user interaction such as ‘Ubuntu’ comes to mind. However the way they are doing it is wrong, basically trying to clone Windows. This is the most aggravating aspect of the entire desktop push why not be unique I cannot comprehend the forced adoption of a MS Windows methodology.
Being a Linux Admin I spend 90% of my day in the CLI however I like it and the raw power behind the command line will never be replaced no matter how fancy of a ‘gui’ style of utility comes out. Much less doing bash/perl scripting to running awk-sed type returns on certain data types the list goes on and on.
CLI is infinite in the power range it possesses the only limitation is the end user in front of the keyboard.
“Linux distro’s have actually shielded or dumbed down the user interaction such as ‘Ubuntu’ comes to mind.”
Furthermore, as I mentioned somewhere else, security barriers are abandoned in order to increase individual feelings of comfort.
“However the way they are doing it is wrong, basically trying to clone Windows. This is the most aggravating aspect of the entire desktop push why not be unique I cannot comprehend the forced adoption of a MS Windows methodology.”
It’s all about usage share, about giving the user what he already knows. Because business and industry are widely infiltrated by MICROS~1 products, users seem to think: “I want the same pictures at home as I know them from my work.”
“Being a Linux Admin I spend 90% of my day in the CLI however I like it and the raw power behind the command line will never be replaced no matter how fancy of a ‘gui’ style of utility comes out. Much less doing bash/perl scripting to running awk-sed type returns on certain data types the list goes on and on.”
The CLI allows you to implement stack processing according to your very individual needs, while similar stack processing mapped onto GUI applications can only be a subset of the first mentioned set.
Additionally, the CLI is fully programmable. And it’s not obsolete in any way: Developers still need to use the keyboard in order to create applications, in order to make the buttons a user can click on.
Seen from a psychological point of view, the CLI is the more intelligent solution. Before you continue reading, I’d like to state that I don’t want to insult anyone or say anything against the use of the mouse. When clicking on an icon, the user does follow the same cognitive and motorical way an infant does. The child points with the finger on what it wants (a concrete object usually) and says “Gah!” or “Dah!” (At least, it says this in Germany, I don’t know what it would say in english.) But in fact, the child does not say a real word or a sentence. A similar behaviour is clicking. Choosing characters from a keyboard in order to form words (and maybe arbitrary combinations of characters that represent commands, redirectors or scopes) requires the ability to speak, regarding to the infant example.
“CLI is infinite in the power range it possesses the only limitation is the end user in front of the keyboard.”
Professional CLI usage requires knowledge. Gain of knowledge requires time. Users are busy and want the result, they’re not interested in the way. And some of them (a minority, I hope) is completely learning-resistent (in german: merkbefreit).
The CLI allows a special level of abstraction (such as variables, iteration, grouping) that makes it very powerful in the right hands.
Seen from a psychological point of view, the CLI is the more intelligent solution. Before you continue reading, I’d like to state that I don’t want to insult anyone or say anything against the use of the mouse. When clicking on an icon, the user does follow the same cognitive and motorical way an infant does. The child points with the finger on what it wants (a concrete object usually) and says “Gah!” or “Dah!” (At least, it says this in Germany, I don’t know what it would say in english.) But in fact, the child does not say a real word or a sentence. A similar behaviour is clicking. Choosing characters from a keyboard in order to form words (and maybe arbitrary combinations of characters that represent commands, redirectors or scopes) requires the ability to speak, regarding to the infant example.
Not exactly. Some time both are needed.
When programming or using visualization engines both type of users interfaces are absolutely required.
A fully accelerated hardware OpenGl/GUI and a CLI for compilations, running tests and gathering informations.
Hardware OpenGL for output graphics results of compiled programs. Nice Qt/GTK widgets to control/show parameters of geometric objects such as in basic operations such as translations,rotations, scaling or much more complex.
In the second, the development part you need a console/CLI to see to waring or error messages sended by GUI or visualization.
Will be almost impossible without CLI to see/pass parameters of an unknown ./configure script.
Best way to debug using GDB is also CLI to solve mysterious and unforeseeable crush of a GUI application.
Not to mention the possibility of shell/perl/wathever scripting capabilities of command line.
A good innovation to CLI is possibility to use wheel mouse button to scroll content of man pages, less or vim output.
Can tell me somebody a nice GUI frontend to ldd command in *nix ?
Edited 2007-10-06 17:45
Well if X windows is not available and you are clueless about configuration basically you are stuck.
On a server or production environment the CLI is more than sufficient for ALL system admin task.
Plus, Ubuntu is not server material maybe for a ‘home’ user but work place no.
However, Red Hat, SuSE or the like have enterprise desktop environments.
The most top distros from Distrowatch.com target desktop users, not servers and usually X Windows is required by intended audience and often installed GUI tools don’t do a well job CLI is a way to go.
“Some time both are needed.”
I didn’t – with any word – deny the right of existance of both, I just pointed out what the advantages and disadvantages are by simple psychological considerations. I didn’t talk about needs for either one of them.
Of course, a good GUI will be interesting even for professionals. For example, I’m using WindowMaker because it’s highly configurable, stays out of my way and lets me work, furthermore it can be controlled magickally by a Sun Type 6 keyboard. 🙂
Today, there are many great GUI solutions out there. But sadly, some are only good as long as you only use the mouse, because they lack proper keyboard support.
A good combination is what professional usually need. And, as you surely know, the choice of the right tool depends on individual requirements and experiences.
“A good innovation to CLI is possibility to use wheel mouse button to scroll content of man pages, less or vim output.”
A CLI is not neccessarily tied to a terminal emulator for X. CLIs are used interactively in console mode, too, where you really have your 80×25 screen. Especially in PC-BSD, moused has support for these text mode consoles: you select text by dragging the highlighting pressing the left mouse button, or select its start using the left and its end using the right button. Pressing the middle button (or, because usually available, the mouse wheel), the content of the buffer will be output at cursor position. So you can copy text from one console to another, e. g. from a manpage on ttyv2 into an editor with your script on ttyv3.
Just as an addition: Why are the “old fashioned” text mode and the keyboard still important? Because there are blind computer users who need to find things at a specific position (such as character keys on a keyboard: they never change position). And they need a system that converts characters (not images!) e. g. from a web page into Braille characters on a Braille output system, so they can read the web page. The fanciest browser does not help them. (If you want to see how blind users read web pages, just load them into the lynx browser and see.)
“A good innovation to CLI is possibility to use wheel mouse button to scroll content of man pages, less or vim output.”
Perhaps you should try out this innovation. Works perfectly for me on this Ubuntu Gutsy Desktop. It also works on any somewhat (past few years) recent version of Fedora from what I can tell
I also happen to be a Linux Admin for a pretty large company (> 3000 Linux servers). However, my work laptop runs Ubuntu because I don’t like having to set things up.
Why spend a day setting up a stage2 gentoo install (no flames intended) when I can spend an hour tops, set up a usable Ubuntu install, rsyncing my keys over, and start getting work done? It just makese sense.
If you mean the gui is hidden in that you don’t have to manually do everything yourself what part of that is bad? Ubuntu / Fedora / openSUSE / Mandriva are all doing good things by making Linux usable for people who don’t want to be technical.
Don’t think I’m advocating using the gui for everything either. Notice the massive flame I posted to this completely clueless Ubuntu guy’s stupid blog posting about how “The Future of Linux Administration will be with GUI Tools”:
http://useopensource.blogspot.com/2007/08/linux-administration-will…
How soon y’all forget! Apple had a GUI before Microsoft; first on the Lisa, then on the Macintosh. Microsoft came up with Windows in response to Apple’s popularity. How Microsoft got to be where they are today is a story for another day.
Just read the whole story.
http://en.wikipedia.org/wiki/History_of_the_graphical_user_interfac…