3

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?

1

3 Answers 3

7

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.

14
  • but I want to run a specific c document exist on my Ubuntu desktop if I make a new directory it will be empty Nov 8, 2013 at 14:46
  • @arzeramade then you can drag the document into the terminal and then remove the "file://" at the beginning. Nov 8, 2013 at 14:48
  • sorry but I am new to UNIX can you tell me exactly how to do this ? Nov 8, 2013 at 14:49
  • @arzeramade What part you don't understand? Nov 8, 2013 at 14:50
  • how to drag the document to terminal Nov 8, 2013 at 14:51
2

cd Desktop/ Goes to the Desktop directory if you are in your home directory.

cd - Goes back to previous directory.

cd / Take you to the root directory.

cd ~/Desktop Will take you to your Desktop Directory no matter where you are.

0

Run this command in terminal,it will help you.

cd ~/Desktop
gcc yourfilename.c
1

Not the answer you're looking for? Browse other questions tagged .