View Full Version : Moving around the shell
Odyssey
23rd January 2008, 17:17
I have downloaded Hardy and want to run the checksum before burning the iso, but cannot remember (if I ever knew) how to move to the desktop.
The prompt now shows:
odyssey@ubuntu610 $
Now if I remember correctly, this should be /home, no?
If so and I want to move down to a (sub) directory on the desktop where the iso is located, I should move down to desktop, then to the (sub) directory (which I believe can be done in one command, no?) then run the checksum.
With apologies for such a basic request:
1) What is the shell command?
2) Do you have a good resource on moving around the shell (my googling did not produce anything useful)
TIA
onomatopoeia
23rd January 2008, 23:10
pwd will tell you what the current directory is.
cd is the command to change directory, eg cd /usr/lib.
Your prompt does not seem configured to show the current working directory, mine says
mark@dangermouse:/etc$
Where '/etc' is the current directory, when you log in the current directory will normally be /home/<username> unless you logged in as root in which case it will usually be /root
I'm afraid all four of the linux systems I manage for work and the three I run at home do not have a concept of a desktop - none of them have screens attached and I SSH into them all (yes I know I could run an X windows server and have a client running on Windows) - so I've no idea how you would "move down to a sub directory on the desktop"..
Gina
24th January 2008, 00:09
Another one for me I think :lol
Your prompt will normally show the directory you're in eg. mine is gina@medion:~$ the tilde (~) indicating my home dir. (gina).
Changing to Desktop is as follows:-gina@medion:~$ cd Desktop
gina@medion:~/Desktop$Now in Desktop directory off gina ie. /home/gina/Desktop
Checking the md5-sum of the ISO to be sure download was error free is detailed in my website (see sig). The easiest way I've found is to install K3b using Synaptic Package Manager both to do the md5-sum and burn ISO to CD or DVD and Verify written data. Again, I've written this up in the Downloading and Upgrading Ubuntu page available from Downloading in the menu. This to me seems much simpler and easier than the command line method.
Odyssey
24th January 2008, 01:03
Ono and Gina,
Wow! Both of yours causes stuff to rush back to me like a freight train.
I had forgotten about the tilde, and of course it was right there on the screen and it just didn't register and I didn't put it in the post.
Before posting, from memory, I had tried exactly the commands that Ono provided, but of course I was putting the "/" in front of the directory that I wanted to move to, and that didn't work, although I don't quite understand why. Anyway, the command without the "/" in front of the desired directory worked perfectly.
And of course, once out of the home directory (with the tilde) all directory names show just as you said.
FWIW, I used the shell to do the checksum and it worked like a charm.
When in the directory containing the .iso to be checked, the command is very simple:
md5sum filename.iso
which yields a hash which you compare it to the value shown in the Ubuntu hash table for the version of U that you are using.
I suspose you could use the command as:
md5sum path/filename.iso (assuming of course competence to get the path right, which is probably pushing it for me)
and it should yield the hash, no?
Nonetheless, I will use your method next time Gina. Sounds much simpler.
onomatopoeia
24th January 2008, 10:48
Before posting, from memory, I had tried exactly the commands that Ono provided, but of course I was putting the "/" in front of the directory that I wanted to move to, and that didn't work, although I don't quite understand why. Anyway, the command without the "/" in front of the desired directory worked perfectly.
The leading forward slash on a path sets it relative to the root (not to be confused with the root user), specifying a path without a leading forward slash makes it relative to where you are.
so
ls /
lists the root directory, viz
mark@dangermouse:~$ ls /
bin command floppy lib proc service usr vmlinuz.old
boot dev home lost+found root sys var
cdrom etc initrd mnt sbin tmp vmlinuz
If I then do a cd /usr
mark@dangermouse:~$ cd /usr
mark@dangermouse:/usr$ ls
X11R6 bin doc games include info lib local man sbin share src
From here I can do cd lib and end up in /usr/lib as the current directory, if I were to do a cd /lib I would end up in /lib.
Odyssey
24th January 2008, 15:29
O No, thanks for the tutorial. I had never understood that.
What distros of linux do you use?
onomatopoeia
25th January 2008, 10:14
Some debian, some ubuntu
vBulletin® v3.7.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.