Showing posts with label leaning linux. Show all posts
Showing posts with label leaning linux. Show all posts

Friday, April 1, 2016

Tutorial Learn Linux The Hard Way (β version) - Exercise 4. Bash: working with files, pwd, ls, cp, mv, rm, touch


In Linux everything is a file. But what is a file? For now it will suffice to say that it is an object which contains some information. It is usually defined like this:
A computer file is a block of arbitrary information, or resource for storing information, which is available to a computer program and is usually based on some kind of durable storage. A file is durable in the sense that it remains available for programs to use after the current program has finished. Computer files can be considered as the modern counterpart of paper documents which traditionally are kept in offices' and libraries' files, and this is the source of the term.
But this definition is too general, so let us be more specific. man stat tells us that file is an object which has the following properties additionally to information it contains:

Thursday, March 31, 2016

Tutorial Learn Linux The Hard Way (β version) - Exercise 3. Bash: The shell, .profile, .bashrc, .bash_history


When working with Linux using CLI (command line interface), you are interacting with a program called a shell. All you type is passed to the shell, which interprets what you have typed, does parameters expansion (which is somewhat similar to brace expansion in algebra) and executes programs for you. Shell which we will be using is calledBash, which stands for Bourne Again Shell, which is in turn a pun. Now I will show you general overview of how the bash works in plain English:

Wednesday, March 30, 2016

Tutorial Learn Linux The Hard Way (β version) - Exercise 2. Text Viewer, The: less is More


Now you can edit text files, that is nice. But what if you want just to view a text file? Of course, you could use vim for that, but very often it is overkill. And two more thing to consider:
  • If you want to view really large file, you will want to view it in a program which is as fast as possible.
  • Often you would not want to accidentally change something in a file.

Tuesday, March 29, 2016

Tutorial Learn Linux The Hard Way (β version) - Exercise 1: Text Editor, The: vim


In Linux, as in any Unix-like OS, everything is just a file. And Unix philosophy states that configuration files must be human readable and editable. In almost all cases, they are just plain text. So, first things first, you must learn how to edit a text file.
For this I strongly advise you to learn basics of vim, which is one of most powerful tools to work with texts in Linux. Vim is reimplementation of vi, the editor written in 1976 by Bill Joy. Vi implemented a concept so successful that even Microsoft Visual Studio 2012 has a plugin, which provides a mode compatible with this more than 35 year old editor. You may play with right here (this is real Linux running in your browser). After you are done go and get get my virtual appliance at last.