Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to pass two command at the same time in a linux shell? For example, Instead of writing commands in this way,

root# cd Python-2.6.6
Python-2.6.6# ./configure

I want something like this to execute whole command in one line;

root# cd Python-2.6.6 ./configure

That is, while being in root, i want to change the directory and configure python file..

share|improve this question
up vote 1 down vote accepted

Use an appropriate command separator.

cd Python-2.6.6 && ./configure
share|improve this answer
Thanks, I am running these commands from python script which will run on the client side to get python installed in remote server. If i run this code in linux, it worked, but when i execute it in from client side i receive error, ['configure: WARNING:\n', '\n', ' By default, distutils will build C++ extension modules with "g++".\n', ' If this is not intended, then set CXX on the configure command line.\n', ' \n'] – khati May 10 '11 at 8:06
So... do you not want to build C++ extension modules with g++ then? – Ignacio Vazquez-Abrams May 10 '11 at 8:11
Well I am quite new to linux. Did not understand your question. But this was the warning message that i got when i run the script. This did not create problem while I was running it from linux , but when i run it from client side (python code), after this message the program stops. How to ignore this message while passing commands? – khati May 10 '11 at 8:16
You can give additional parameters to configure which will control how (with what options) python will be built. To see a list of these parameters, run ./configure --help and then select the appropriate options for your target system. – Sven May 10 '11 at 8:27

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.