background preloader

Linux

Facebook Twitter

Series: Unix as IDE « Arabesque. The text editor is the core tool for any programmer, which is why choice of editor evokes such tongue-in-cheek zealotry in debate among programmers. Unix is the operating system most strongly linked with two enduring favourites, Emacs and Vi, and their modern versions in GNU Emacs and Vim, two editors with very different editing philosophies but comparable power.

Being a Vim heretic myself, here I’ll discuss the indispensable features of Vim for programming, and in particular the use of Linux shell tools called from within Vim to complement the editor’s built-in functionality. Some of the principles discussed here will be applicable to those using Emacs as well, but probably not for underpowered editors like Nano. This will be a very general survey, as Vim’s toolset for programmers is enormous, and it’ll still end up being quite long.

Filetype detection if has("autocmd") filetype on filetype indent on filetype plugin on endif Syntax highlighting syntax on Line numbering set number Tags files :! Tutorials | Introduction to UNIX for Web Developers. Bash Shell Scripting - 10 Seconds Guide. This Bash shell scripting guide is not a detailed study but a quick reference to the BASH syntax.

So lets begin... Common environment variables PATH - Sets the search path for any executable command. Similar to the PATH variable in MSDOS. HOME - Home directory of the user. MAIL - Contains the path to the location where mail addressed to the user is stored. IFS - Contains a string of characters which are used as word seperators in the command line. . $ echo $IFS | od -bc PS1 and PS2 - Primary and secondary prompts in bash. . $ ls | ... and press enter. USER - User login name. TERM - indicates the terminal type being used. SHELL - Determines the type of shell that the user sees on logging in. To see what are the values held by the above environment variables, just do an echo of the name of the variable preceded with a $. For example, if I do the following: $ echo $USER ravi ... Some bash shell scripting rules The first line in your script must be #!

Conditional statements 'if' Statement Example : Example: $ . How to Use GNU Screen. // May 21st, 2011 // Posted in Linux, OS X // Tagged as gnu-screen, unix On UNIX, GNU Screen is a utility that I cannot live without. I know many console users share the same point of view with me. What is GNU Screen? It is a terminal multiplexer and you can run multiple console-based applications simultaneously. With that feature GNU Screen is indispensable when it comes to do console sessions on low speed connection. Anyway, here are some most useful features of GNU Screen that I use most of the time. Please share this journal with others: How to compile a Ubuntu 10.10 kernel. Ubuntu 10.10 was released in October and I have been writing articles on “How to compile a kernel for Ubuntu …” for a few releases and there is no exception for Ubuntu 10.10.

The Ubuntu kernel developers have decided to change things up yet again for the Ubuntu 10.10 kernel, I guess it will change every Ubuntu release. Introduction git I’ll be using git to get the latest kernel version. This is my favorite way to get the sources and it is in my opinion the fastest way to make changes later on when you want to update your own kernel to the latest version. Architecture I am compiling the i386 version, if you want to compile for amd64 you need replace i386 for amd64 throughout this article.

Flavor I choose the name core2 as the flavor name as for my personal use I’ll build a kernel for a Core2 processor. Preparations Let’s get started by preparing our machine for compiling the Ubuntu 10.10 kernel. Getting the source The source code is installed in the directory source. git tag -l | sort -V cp ..