linux terminalMany say that Linux is a perfect operating system for programmers. I agree with that. Linux is very stable, fast, and secure. Its repository is nearly complete for all programming needs. And there is one important reason: the Linux command line.

The simplicity and speed makes it sometimes more powerful than the GUI ones. And even some command line based programs have no counterparts in GUI-based. This is an advantage to programmers. We want utilities that are simple, robust, fast, no fuss.

Here are some Linux commands that I usually use as main weapons for programming tasks:

vim
Vim can be used as programming editor. This may be a personal preference, you may prefer to use GUI-based editor. But I like it very much. If you’ve read the manual and practiced regularly, you could type faster than your friends!

make
If you’re using C++ as your programming language, you will find this command save your keystrokes. make can be used as shorthand for g++ compile syntax (although it’s more powerful than that). So, instead of typing g++ -o test test.cpp, simply type make test.

diff
Sometimes you must compare two files, and check whether they differ. Example is the output files of two programs of the same problem. One is the real program, and the other is a checker program with brute-force algorithm. diff can do that.

time
Ensuring that your algorithm runs in allowed time is very important. This command measures how long a program executes until it terminates. Very useful in programming contests.

indent
Are you lazy to properly indent your source code, or doesn’t your editor support this? Don’t worry again. Just use command indent, and your source code will be formatted nicely. It has many options and well-known indentation styles.

bc
This is shorthand for “Basic Calculator”. Despite its name, it can do powerful calculations. This calculator employs arbitrary-precision number. That means there’s no limit in number of digits! It’s clearly more powerful than the built-in Linux calculator in you favorite desktop.

That’s it. I just introduced you the commands. For more information, see this documentation or type man command in terminal.

  • Share/Bookmark

Enjoyed this article? Subscribe to our RSS feed for free!

Related posts:

Be the first to comment!

Leave a Reply