LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   I guess different distros use different command lines? (https://www.linuxquestions.org/questions/linux-newbie-8/i-guess-different-distros-use-different-command-lines-555405/)

mhg 05-20-2007 04:05 PM

I guess different distros use different command lines?
 
Hi All,

Making progress using Ubuntu 6.10.

I want to configure automount settings. Someone posted two great links with instructions, but I can not get the commands they go through to work. I know different distros use different commands, and I know so very little about using the command line.

For example, the instructions say to do: Edit/etc/auto.master. This command gets me nowhere in Ubuntu.

I have posted on the Ubuntu.org forums, but no help there yet.

Will I have to be more familiar with commands particular to Ubuntu to do this myself? Or hope to find Ubuntu specific instructions?

Thanks for all help.

rickh 05-20-2007 04:27 PM

Quote:

For example, the instructions say to do: Edit/etc/auto.master.
"Edit/etc/auto.master" is not the same thing as "Edit /etc/auto.master"

The first one doesn't make any sense to me. The second means, open the file, /etc/auto.master, in a text editor, and change it.

bigjohn 05-20-2007 04:33 PM

Quote:

Originally Posted by mhg
Hi All,

Making progress using Ubuntu 6.10.

I want to configure automount settings. Someone posted two great links with instructions, but I can not get the commands they go through to work. I know different distros use different commands, and I know so very little about using the command line.

For example, the instructions say to do: Edit/etc/auto.master. This command gets me nowhere in Ubuntu.

I have posted on the Ubuntu.org forums, but no help there yet.

Will I have to be more familiar with commands particular to Ubuntu to do this myself? Or hope to find Ubuntu specific instructions?

Thanks for all help.

Nope, complete re-edit. I was getting my "vi's" mixed up.

To edit the /etc/auto.master file, you'd have to do
Code:

sudo vi /etc/auto.master
in a terminal window.

Then, once the file is open, you can move around it with the arrow keys (I think theres a mod/package available for mouse control but I've never used it), to make any actual changes in vi, hit the insert button, move to where you want to make the change.

Then hit esc, then to save it and close, it's :wq (colon and letters w and q). Bingo it's done.

Or you could install nano (from the package managers list), but the command to get it going is still gonna be
Code:

sudo nano /etc/auto.master
and I think that it's still moved/navigated with the arrow keys. The difference is that theres a little line at the bottom that tells you some of the commands that you'd need i.e. once opened, you make the change(s), then when thats done, it's just ctrl+x, answer y to save the mod to the file and that should be it (I'm trying to picture it in my head to remember).

Different distros can and do, have different default text editors. Or you can install one that you like, but you still have to make sure about upper and lower case, spaces and slashes etc etc, because one typo is the difference between the right file and a different one (that might be wrong or just blank as it's not used).

regards

John

p.s. erm here's some VI instructions that I found linked from the Ubuntu Wiki all you'd have to do is remember how to start VI in the first place the follow the instructions to edit just about any file you'd need to (there is one or two that need a version called visudo - the sudoers file I think is one, but hey, check the guide (theres probably an official one out there too!).

IsaacKuo 05-20-2007 07:14 PM

Ubuntu uses the same commands as any other *nix, but it does do one pervasive thing quite differently, by default.

The standard method of running commands with "root" superuser access is by logging in as root using the "su" command. By default, Ubuntu doesn't allow this. Instead, Ubuntu disables root and makes the default user a "sudoer" (a dubious security tradeoff to say the least). This is accomplished via a usually optional software package called "sudo".

The basic upshot is that if you see documentation like this:

su
vi /etc/fstab
mount /media/usbstick

You need to instead enter this:

sudo vi /etc/fstab
sudo mount /media/usbstick

rkelsen 05-20-2007 07:29 PM

Ubuntu is not the "be all and end all" of Linux distributions.

There are better ones kicking around.

masonm 05-20-2007 07:48 PM

If you're running Gnome you can also use gedit <filename>.

I like Midnight Commander and use it quite a bit. You can install that with apt or use Synaptic, the package is named mc.

The editor is started with mcedit <filename>

mhg 05-20-2007 08:09 PM

Quote:

Originally Posted by rkelsen
Ubuntu is not the "be all and end all" of Linux distributions.

There are better ones kicking around.

But a newbie eventually has to pick something and start. Maybe what I am learning now will help when I am ready to try another distro.

BTW, I have PCLinuxOS installed also, and not having much better luck with it, but have spent very little time with it.

Thanks

2damncommon 05-20-2007 08:13 PM

Quote:

Originally Posted by IsaacKuo
The basic upshot is that if you see documentation like this:

su
vi /etc/fstab
mount /media/usbstick

You need to instead enter this:

sudo vi /etc/fstab
sudo mount /media/usbstick

Or do "sudo su -" first then enter all other commands as described.


All times are GMT -5. The time now is 07:07 PM.