≡ Menu

FAQ

Question: Is it possible for me to combine multiple sed commands? Can I combine two sed commands and execute it as single sed command? Answer: In our previous articles we learned sed with single commands — printing, deletion, substitute and file write. In this article let us review how to combine multiple sed commands using [...]

{ 9 comments }

Do You Like to Perform Vi Style Editing in BASH Command Line ?

Question: I like Vi style of editing and I’m very comfortable with Vi commands. How do i use Vi style line editing in Unix command line? Answer: Execute set -o vi at your Unix shell to enable Vi style editing. Enable Vi Style Editing in BASH $ set -o vi By default the command line [...]

{ 1 comment }

Unix Shell Tips: Change Login Shell From Bash to Others

Question: How do I find out what Unix shell I’m currently running? Can you also explain how can I change my Unix shell both temporarily and permanently? (For example, from bash to tsh). Answer: You can achieve these using $0, exec, chsh -s. In this article, let us review how to do these in detail. [...]

{ 12 comments }

Question: I would like to understand the basics of how to write and execute a pascal program on Linux OS. Can you explain it with a simple example? Answer: In this article, let us review very quickly how to write a basic Hello World pascal program and execute *.p or *.pas program on Linux or [...]

{ 2 comments }

Question: How do I find out what time I executed a command previously on Unix OS? The history command doesn’t display timestamp. Answer: Set HISTTIMEFORMAT as shown below. Please note that there is a space before the last single-quotes. $ export HISTTIMEFORMAT='%F %T ' After the above setting, history command will display timestamp in front [...]

{ 8 comments }

Question: I would like to understand the basics of how to write and execute a ruby program on Linux OS. Can you explain it with a simple example? Answer: In this article, let us review very quickly how to write a basic Hello World ruby program and execute *.rb program on Linux or Unix OS. [...]

{ 2 comments }

How To Install Java JDK or JRE on Ubuntu or Debian

Question: How do I Install Java on Ubuntu or Debian OS? Answer: If Java is not installed, you’ll get the following error message when you do java -version. # java -version The program 'java' can be found in the following packages: * gij-4.3 * java-gcj-compat-headless * openjdk-6-jre-headless * cacao * gij-4.2 * jamvm * kaffe [...]

{ 27 comments }

Ubuntu Tips: How To Enable Root User ( Super User ) in Ubuntu

Question: I’m unable to do su – on Ubuntu. It says “su: Authentication failure”. How do I fix it? Also, is it possible for me to login to Ubuntu using root account directly? Answer: Let us address these two question one by one. Warning: Enabling root is not recommended. If possible, you should always try [...]

{ 46 comments }