Here Is The Dumbest Noobie Question You've Ever Seen

:o:o Let me preface this by saying that I am a complete noob (newb??) to the Linux universe. I have been using computers for a long time, and am pretty good with Windows. I started with DOS, so command line input doesn’t bother me that much.

Question: How do you edit files? This seems to be so inherent to Linux, but nowhere on the internet, or in any SUSE documentation can I discover how to do this! There are so many places that state “… add this line to your /etc/fstab …” , but nowhere, not even in the most basic tutorials, does it state how this is done.

Can someone (slowly shaking their head and sighing deeply) walk me through this? Pretend your new blonde girlfriend needed to do this and you were walking her through it over the phone.

For instance ( and I know this isn’t correct )

Step 1: Open a terminal. (or Yast, or whatever)
Step 2: Type “???” to go to run level ?. (Or whatever)
Step 3: Whatever

Or, failing that, can anyone direct me to a website or literature that explains how one accomplishes this seemingly ubiquitous, mundane task in Linux that everyone (but me) knows how to do?

Now the why -

I would like to enable a 1.44 floppy on my machine. The BIOS knows it’s there, and so does SUSE 10.3, but it won’t mount the blasted thing. I have the (KDE 4) desktop icon, but when I try to mount from it, it reads the drive for a while, then returns “mount: /dev/fd0 is not a valid block device” or something like that.

I think, from my research, that I need to add the line “/dev/fd0 /media/floppy auto noauto,user,sync 0 0” to my /etc/fstab file, but I don’t have any idea how to begin doing that.

Any assistance would be greatly appreciated.

Thank you all for even reading this.

open a terminal
and run

su (if this is a global file)
gedit /path/to/file (on gnome) 
kate /path/o/file (on kde)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Console-based editors: vi (very powerful, takes some time to learn),
nano, pico, ed, etc.

GUI-based editors( gedit, kate, etc.).

To run in the GUI press Alt+F2 and type in the command. To run from the
command line just use the command. ‘vi’ will always be there, emacs
probably as well, and the others depend based on your distro as some
favor some while some favor others. If you can learn ‘vi’ and/or emacs
because they will be universal and are both powerful.

Good luck.

Masterbuilder wrote:
| :o:o Let me preface this by saying that I am a complete noob (newb??)
| to the Linux universe. I have been using computers for a long time, and
| am pretty good with Windows. I started with DOS, so command line input
| doesn’t bother me that much.
|
| Question: How do you edit files? This seems to be so inherent to
| Linux, but nowhere on the internet, or in any SUSE documentation can I
| discover how to do this! There are so many places that state “… add
| this line to your /etc/fstab …” , but nowhere, not even in the most
| basic tutorials, does it state how this is done.
|
| Can someone (slowly shaking their head and sighing deeply) walk me
| through this? Pretend your new blonde girlfriend needed to do this and
| you were walking her through it over the phone.
|
| For instance ( and I know this isn’t correct )
|
| Step 1: Open a terminal. (or Yast, or whatever)
| Step 2: Type “???” to go to run level ?. (Or whatever)
| Step 3: Whatever
|
| Or, failing that, can anyone direct me to a website or literature that
| explains how one accomplishes this seemingly ubiquitous, mundane task
| in Linux that everyone (but me) knows how to do?
|
| Now the why -
|
| I would like to enable a 1.44 floppy on my machine. The BIOS knows
| it’s there, and so does SUSE 10.3, but it won’t mount the blasted
| thing. I have the (KDE 4) desktop icon, but when I try to mount from
| it, it reads the drive for a while, then returns “mount: /dev/fd0 is
| not a valid block device” or something like that.
|
| I think, from my research, that I need to add the line “/dev/fd0
| /media/floppy auto noauto,user,sync 0 0” to my /etc/fstab file, but I
| don’t have any idea how to begin doing that.
|
| Any assistance would be greatly appreciated.
|
| Thank you all for even reading this.
|
|
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIW+H93s42bA80+9kRAhEDAJ9euENkUF8mVURG6nDvMV34pPXM2wCfaHNh
KXYteoVqZ+JiWHBC/NbLT+o=
=L39U
-----END PGP SIGNATURE-----

To run in the GUI press Alt+F2 and type in the command.

What command???

So I open Konsole.
Log on as super user.
Type: kate /etc/fstab

Does the file open in a text editor? How do I save the changes?

kate is a text editor see here for some info on kate

Andy

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Have you tried it?

Good luck.

Masterbuilder wrote:
| some-guy;1821552 Wrote:
|> open a terminal
|> and run

Code:
> > su (if this is a global file)
> gedit /path/to/file (on gnome)
> kate /path/o/file (on kde)
--------------------
So I open Konsole.
Log on as super user.
Type: kate /etc/fstab
Does the file open in a text editor? How do I save the changes?

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIW/H93s42bA80+9kRAgktAJ9hB0iWPy0YPn6GbS5oEtZX9OtjpgCdHs1m
9Vn00HiCJpEtzejx9ChHFJA=
=gD5X
-----END PGP SIGNATURE-----

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

The commands mentioned above, same as the program names.

Good luck.

Masterbuilder wrote:
| -To run in the GUI press Alt+F2 and type in the command.-
|
| What command???
|
|
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIW/IR3s42bA80+9kRAomsAJsG5LqLnyC09c48Et04oFJQLIp21gCfcFG1
2v6mHRDlkaZ31picTRpqnss=
=BiHr
-----END PGP SIGNATURE-----

On 06/20/2008 Masterbuilder wrote:
> Question: How do you edit files?

To add to what everybody else said and to confuse you even more:
I like Midnight commander and its built in editor for easy tasks. If you remember Norton Commander from the old DOS days, you’ll find it easy. It is a file manager, with an editor. Note you have to install it first, through Yast or whatever you use to install software. Search for “mc”.

Once it is installed, open a console and type “mc” without the quotes.

Move around with the arrow keys. F3 will try and open a file for reading, F4 will open the editor.

As for other editors: “vi” is installed on almost every Linux system by default, that’s a big pro. Getting familiar with the basic commands isn’t a big deal, and definitely worth the time spent.

HTH
Uwe

MasterBuilder,

You might want to have a look at The Rute Guide to Linux. It’s an excellent set of training material, if a bit heady.

http://rute.2038bug.com/index.html.gz

> I started with DOS, so command line input
> doesn’t bother me that much.

if you remember the old Norton Commander (or any of its many many
clones), you are gonna love Midnight Commander (MC)…once installed
(install instructions follow, below) you just:

step 1: open an X-terminal/konsole
step 2: type mc press enter
step 3: MC opens, navigate to the file you wanna edit
step 4: when file is highlighted, press F4 to edit or F3 to read
step 5: to save edited file press F2 > Save
step 6: to exit MC, press F10 > Yes
step 7: to close terminal, type exit pess exit

if you need to edit a file as root (you will know automatically you need
root, if at any time in the above you are either not allowed to view or
save a file)

step 1: open an X-terminal/konsole
step 2: type su - press enter [others will say ‘su’, but an OLD unix
guy told me to always use ‘su -’ which sets root’s path/environment]
step 3: type the root password at the prompt press enter
step 4: type mc press enter
step 5: go to step 4 in the list of seven steps above and continue…

INSTALL: Midnight Commander is not default installed in SuSE…follow
YaST > Software Management > and enter mc in the search block …

when the right side of the screen is populated click on mc and
mc-lang and then the Accept button at the bottom…simple.

BUT, if you don’t remember Norton Commander, then the others are telling
you how to use either a GUI (kate, kwrite, gedit, and others…not all
are default installed) or text based editor (vi is EVIL-avoid, emacs is
usable/POWERFUL but complicated sometimes)…personally, i use the gui
editor kwrite (it seems to be the SIMPLEST to understand and use, but it
is a KDE thing, and my not be on your system if you are using gnome [try
gedit] or one of the other window managers):

step 1: open an X-terminal/konsole
step 2: type kwrite press enter
step 3: use the buttons at the top to open/search/save/etc the file

if you need to do it as root, just log in as root prior to typing
kwrite…simple…

good luck–have fun, there is LOTs of stuff to learn here…
DenverD

DenverD:

Thank you, thank you, thank you!!!

I did it using kate. The floppy still won’t read (something about not knowing what file system it is), but I actually edited two of my root system files!

Thanks again - but know that you may have created a monster here.

vi (vim) is excellent. Very easy to edit files, albeit you don’t use a mouse (in console|terminal version). VIM makes an Esc-button pusher outta you.

> THANK YOU, THANK YOU, THANK YOU!!!

welcomeX3

> I did it using kate. The floppy still won’t read (something about not
> knowing what file system it is), but I actually edited two of my root
> system files!

hmmmmm…i went back and read your initial post again…i should have
anticipated that failure to mount, sorry i didn’t, but happy you made
SOME progress…TRY this:

step 1: insert a floppy with a vfat file system in the floppy drive
step 2: open a terminal
step 3: type sudo mount -t vfat /dev/fd0 /media/floppy
step 4: press enter
step 5: when the whirring stops and the cursor returns to your
terminal screen, type mc and press enter
step 6: when Midnight Commander pops to view navigate to
/media/floppy and feast your eyes on the contents of your floppy disk

HOWEVER, maybe that floppy is not vfat…(but it probably is)…other
potential file systems can be found by looking at the manual for the
mount command…ah, i bet you don’t know how to find/read the manual
yet, huh:

step 1: open a terminal
step 2: type man mount {man = manual aka “man pages”}
step 3: learn about the mount command, and need to TELL the system what
kind of file system is in use, by using the -t switch
step 4: use up/down arrows & page up/down to navigate and q to quit

CAUTION: when you are done with that floppy, BEFORE you pull it out of
the drive, you should UNmount it:

step 1: open a terminal
step 2: press the up arrow to scroll back to your mount command
sudo mount -t vfat /dev/fd0 /media/floppy
{erase/type to} sudo umount /media/floppy
step 3: enter your root password
step 4: if it says something like unknown command, go back and type
umount (and not unmount – heh)
step 5: if it says it is in use then go back to the terminal where you
left MC looking at the floppy and quit USING the floppy (heh)

> Thanks again - but know that you may have created a monster here.

you have stumbled into a world of new stuff to explore…
You are proceeding along a darkened passageway, up ahead you see a dim
light . . .

you are gonna love linux…but, there is LOTS of learning ahead…ain’t
it grand?

DenverD

Important, too, is the use of ‘man’ (manual). Also site news - die.net has easy access to any man page i’ve ever asked it to show me (those times when i’m on a winblows computer and haven’t access to ‘man’)

use kedit. Simular to Notepad.:cool:

DenverD:

Thanks again for your patience. I am, among other things, a youth marksmanship instructor - and I appreciate it any time someone will bring themselves back to the most basic level of [mis]understanding to help a lost beginner. Just learning how to edit files helped me immensely.

I didn’t start this thread to be about my floppy drive, just file editing. But since you offered, here is the Konsole screen:

sam@linux-jise:~> sudo mount -t vfat /dev/fd0 /media/floppy
root’s password:
mount: wrong fs type, bad option, bad superblock on /dev/fd0,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

you have stumbled into a world of new stuff to explore…

I guess that’s why I did this.

You are proceeding along a darkened passageway, up ahead you see a dim light . . .

That wouldn’t happen to be an Inn (with a Public Room), would it?

you are gonna love linux

Give me 5 years and I’ll let you know.

…but, there is LOTS of learning ahead

I’ve figured that one out already

…ain’t it grand?

Like I said, give me 5 years…:wink:

> (those times when i’m on a winblows computer and haven’t
> access to ‘man’)

never use that system, at all…so, “man [something]” always works
here…but, thanks for the pointer anyway…

one problem with all outside my system is i might find a man page (at
die.net or anywhere google sends me) for a five year OR one day old
command (that is a different version than my own)…i think if i use
those on MY system, i’ll get one that exactly matches what i’m using…

DenverD

> sam@linux-jise:~> sudo mount -t vfat /dev/fd0 /media/floppy
> root’s password:
> mount: wrong fs type, bad option, bad superblock on /dev/fd0,
> missing codepage or helper program, or other error
> In some cases useful info is found in syslog - try
> dmesg | tail or so


are we sure we have a good/readable floppy?

  • if you insert that floppy in another machine (with a known good
    drive and OS) can you access/read it?
  • can you determine its file system?
  • if you run fdisk (or similar) against it, is it error free?
  • is the ‘superblock’ of that floppy bad?

are we sure we have a good drive?

  • will ANY floppy work in that drive?

  • can you boot to a different operating system and access that or any
    other floppy on that drive?


what was the output of dmesg | tail?

step 1: follow all the steps to try to mount the floppy
step 2: in the already opened console, and immediately below the error
type dmesg | tail and press enter

that command will show the last 10 lines of the kernel ring buffer…
[no, i’m not smart enough to know that…i learned it by successively
running ‘man dmesg’ and ‘man tail’]

good luck,
DenverD