Terminal

Johnny Rosenberg gurus.knugum at gmail.com
Sun May 17 08:21:15 UTC 2009


2009/5/16 Ruben Varela <rovr138 at gmail.com>:
> On Sat, May 16, 2009 at 5:35 PM, Johnny Rosenberg
> <gurus.knugum at gmail.com> wrote:
>>
>> 2009/5/16 sg1 <thedoctor at iinet.net.au>:
>> > Hi
>> >
>> > Trying to move from sg1 to desktop what is the exact command.
>> > The below lines did not work.
>> >
>> > Thanks
>> >
>> > root at sg1-desktop:/home/sg1# cd ~/Desktop
>> > bash: cd: /root/Desktop: No such file or directory
>> > root at sg1-desktop:/home/sg1#
>> >
>> Seems like you are still root. You don't need to be, do you? So first
>> type ”exit” to go back to normal user. As long as you are root, ~
>> means ”/root”, even if you are at your home folder.
>>
>> If you use your TAB key for autocompletion, you will make sure that
>> every folder and file you enter exists. You can double-hit the TAB to
>> see what options are available.
>>
>> When not root, these commands will do what you want:
>>
>> sg1 at sg1-desktop:~$ cd Desktop
>> sg1 at sg1-desktop:~/Desktop$
>>
>> or
>>
>> sg1 at sg1-desktop:~$ cd ~/Desktop
>> sg1 at sg1-desktop:~/Desktop$
>>
>> or
>>
>> sg1 at sg1-desktop:~$ cd $HOME/Desktop
>> sg1 at sg1-desktop:~/Desktop$
>>
>> or
>>
>> sg1 at sg1-desktop:~$ cd /home/sg1/Desktop
>> sg1 at sg1-desktop:~/Desktop$
>>
>> Even though the last command is longer than the others, it doens't
>> require very much typing. It depends on how your folders and files are
>> organized, but this would probaby be enough:
>>
>> cd /h[TAB]s[TAB]D[TAB][↵]
>
> cd /h[TAB]s[TAB]De[TAB][↵]
> If not it'll give you the options of Desktop and Documents
> ;)
>

As I said, it depends on how your folders are organized. I, for
instance, don't have a ~/Documents folder. Maybe most people do, and I
just removed mine, I don't know.

But [TAB][TAB] (make sure there's not too much time between each
[TAB]) gives you all the options you have for a certain string.

J.R.

>>
>> If you really have to be root (why, why why?), you can't use ~ since
>> that's the root's home folder, not yours. You can't use $HOME either,
>> since that's also root's home folder. So you really need to input the
>> complete path: cd /home/sg1/Desktop
>>
>> I've seen people saying that root doesn't have a desktop. On my
>> machine root DOES really have a desktop, but I don't know why. Maybe I
>> copied my own desktop there by mistake months ago when I was an even
>> more beginner than I am today… That doesn't explain, however, why my
>> wife also have /root/Desktop on her machine…
>>
>> J.R.
>>
>> >
>> > --
>> > ubuntu-users mailing list
>> > ubuntu-users at lists.ubuntu.com
>> > Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>> >
>>
>> --
>> ubuntu-users mailing list
>> ubuntu-users at lists.ubuntu.com
>> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>
> --
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>




More information about the ubuntu-users mailing list