Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

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

I'm new to Linux (I am running Ubuntu). I am learning new commands for the terminal and even following some guides/forums on how to do stuff. Sometimes I will type a command and the terminal makes a newline then sits with a blinking cursor after the last command I typed.

Sometimes I think the computer is just thinking and needs time to do something (although it would be nice to have some sort of indication of the progress on the given task). Sometimes the terminal progresses to let me type a new command and other times I wait a few minutes before pressing ctrl+c to stop whatever it was doing.

It would be nice to know what I'm dealing with here so I can judge better whether I am supposed to be waiting or just wasting my time.

share|improve this question

closed as unclear what you're asking by Radu Rădeanu, Sneetsher, guntbert, bain, Sylvain Pineau Jul 8 '14 at 6:37

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question.If this question can be reworded to fit the rules in the help center, please edit the question.

What particular command are you typing in the terminal? – ryekayo Jul 7 '14 at 0:15
Look at this command: sudo chmod +x it do nothing that mean done i think your command is somthing like this. – Black Block Jul 7 '14 at 12:33
@Naruto Yes, that's the command. I was trying to do "sudo chmod" something on a partition else where on my computer (rather than the partition Linux is on). – GoProCameraByGoPro Jul 8 '14 at 3:20
Then it's ok this command changes the file mode for this partition and when the terminal says nothing this mean that this command is done successfully without errors . – Black Block Jul 10 '14 at 11:20

I would quote Eric S. Raymond's The Art of Unix Programming:

Rule of Silence: When a program has nothing surprising to say, it should say nothing.

One of Unix's oldest and most persistent design rules is that when a program has nothing interesting or surprising to say, it should shut up. Well-behaved Unix programs do their jobs unobtrusively, with a minimum of fuss and bother. Silence is golden.

This “silence is golden” rule evolved originally because Unix predates video displays. On the slow printing terminals of 1969, each line of unnecessary output was a serious drain on the user's time. That constraint is gone, but excellent reasons for terseness remain.

I think that the terseness of Unix programs is a central feature of the style. When your program's output becomes another's input, it should be easy to pick out the needed bits. And for people it is a human-factors necessity — important information should not be mixed in with verbosity about internal program behavior. If all displayed information is important, important information is easy to find.

-- Ken Arnold

Well-designed programs treat the user's attention and concentration as a precious and limited resource, only to be claimed when necessary.

Of course, many programs don't obey this rule, and the answer really depends on the particular program.

share|improve this answer

There are some commands that don't print anything on the standard nor error output.

But they set the return code accordingly. The return code of any command can be accessed by the $? variable just after executing the command. If it is 0, then the command ran successfully. If it is a value greater than 0, then an error occurred.

This is very convenient when using these commands in script, as you just have to do something like this :

command && echo "Returned an OK status" || echo "Returned an non-OK status"

Or, when more actions are to be taken base on the returned status :

if [ $? == 0 ]; then
   # code to be executed when the command was executed successfully
   # code to be executed when the command was not executed successfully

In other cases, this is the way used by command to tell that something is enabled or not, like the selinuxenabled command which return 0 if SE (Security Enhanced) Linux is activated, 1 if it is not.

share|improve this answer
Indeed, that is why prompts which use the return code of the previous command are so useful! – muru Jul 7 '14 at 13:51

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