Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

when I open up the terminal and write the command

cd Desktop  

also I have tried

cd /Desktop

a message appears that no file or directory was found what I suppose to do? I have logged in as a root but still have the same problem any help?

share|improve this question
add comment

2 Answers

up vote 0 down vote accepted

To enter your user's Desktop directory, run cd ~/Desktop (the ~ is expanded into your user's home directory). If your Desktop directory doesn't exist, you can create it via mkdir ~/Desktop.

share|improve this answer
    
but I want to run a specific c document exist on my Ubuntu desktop if I make a new directory it will be empty –  arze ramade Nov 8 '13 at 14:46
    
@arzeramade then you can drag the document into the terminal and then remove the "file://" at the beginning. –  Ramchandra Apte Nov 8 '13 at 14:48
    
sorry but I am new to UNIX can you tell me exactly how to do this ? –  arze ramade Nov 8 '13 at 14:49
    
@arzeramade What part you don't understand? –  Ramchandra Apte Nov 8 '13 at 14:50
    
how to drag the document to terminal –  arze ramade Nov 8 '13 at 14:51
show 9 more comments

Run this command in terminal,it will help you.

cd ~/Desktop
gcc yourfilename.c
share|improve this answer
    
Why sudo to compile? One link at random: cboard.cprogramming.com/linux-programming/… –  Rmano Nov 8 '13 at 16:13
add comment

Your Answer

 
discard

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.