Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

Dec 312009
 

How to run multiple commands at once in Linux?

Answer:

You can separate the commands by a semicolon ;

e.g.

cat foo.txt; cat bar.txt

Two commands will be executed one by one.

However, if you want to execute a command if and only if previous command is executed successfully, then you can use && to separate them

e.g.

make && make install

So if make failed, make install will not be executed.