LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-24-2005, 05:53 AM   #1
mral
LQ Newbie
 
Registered: Dec 2005
Posts: 12

Rep: Reputation: 0
Help creating an Alias that will mount floppy


I'm trying to create an alias called M that will mount a floppy
in Fedora Core 4.

Last edited by mral; 12-24-2005 at 06:00 AM.
 
Old 12-24-2005, 06:39 AM   #2
DarkElf109
Member
 
Registered: Dec 2005
Location: Phoenix, AZ
Distribution: Ubuntu, Debian, Gentoo
Posts: 43

Rep: Reputation: 15
alias M='sudo mount /dev/fd0 <mount point>'
 
Old 12-24-2005, 06:51 AM   #3
mral
LQ Newbie
 
Registered: Dec 2005
Posts: 12

Original Poster
Rep: Reputation: 0
How do I know what mount point to use?
 
Old 12-24-2005, 07:02 AM   #4
DarkElf109
Member
 
Registered: Dec 2005
Location: Phoenix, AZ
Distribution: Ubuntu, Debian, Gentoo
Posts: 43

Rep: Reputation: 15
By mount point, I simply meant, whatever folder you want it to mount to. For example, if I want my floppy drive's contents to be available from "/home/darkelf/floppy/", I'd use the command "sudo mount /dev/fd0 /home/darkelf/floppy". You can use whatever folder you want to mount the drive to.
 
Old 12-24-2005, 07:10 AM   #5
mral
LQ Newbie
 
Registered: Dec 2005
Posts: 12

Original Poster
Rep: Reputation: 0
Why do you have to use the sudo command?
alias M='sudo mount /dev/fd0 <mount point>'

Will this work?
alias M='mount /dev/fd0 /mnt/floppy'
 
Old 12-24-2005, 07:11 AM   #6
DarkElf109
Member
 
Registered: Dec 2005
Location: Phoenix, AZ
Distribution: Ubuntu, Debian, Gentoo
Posts: 43

Rep: Reputation: 15
Depending on your distribution, you need to be root to mount any partition or device. As such, unless you stay logged in as root all the time (which you should NOT be doing), you should be using sudo to run individual commands as root.
 
Old 12-24-2005, 07:22 AM   #7
mral
LQ Newbie
 
Registered: Dec 2005
Posts: 12

Original Poster
Rep: Reputation: 0
Great...
So if I log in as myself, then I do a su - to become root can I just type
alias M='mount /dev/fd0 /mnt/floppy'
#exit
$M

Last edited by mral; 12-24-2005 at 07:29 AM.
 
Old 12-24-2005, 07:28 AM   #8
DarkElf109
Member
 
Registered: Dec 2005
Location: Phoenix, AZ
Distribution: Ubuntu, Debian, Gentoo
Posts: 43

Rep: Reputation: 15
Yes, you can. But, as you use Linux more, you'll see that using su, doing one or two commands, then logging out again can become quite tedious. Hence, sudo =)
 
Old 12-24-2005, 07:47 AM   #9
mral
LQ Newbie
 
Registered: Dec 2005
Posts: 12

Original Poster
Rep: Reputation: 0
Thumbs up

Great. Thanks for your help.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need advice on creating an alias thorney Linux - General 2 11-27-2005 08:33 PM
Apache - creating an alias to access a cd-rom or DVD. verlossen Linux - Software 2 11-23-2005 07:14 AM
Creating an alias (name=value pair) where the name has spaces. Cubert Linux - Newbie 2 01-12-2005 07:42 AM
Creating mult command alias in BASH labob Linux - Newbie 1 11-18-2004 08:37 PM
problem creating an alias to mount a drive j_l_ajaste Linux - Newbie 6 07-01-2003 11:41 PM


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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration