LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-02-2007, 12:46 PM   #1
>>BLACKHOLE<<
Member
 
Registered: Jun 2006
Location: In the bended light of the prism-
Distribution: Mandriva
Posts: 53

Rep: Reputation: 15
EMAC tut.


Hey whats up fellow members-
---------------------------

I'm stuck on a small issue about creating files. Im trying to fully understand the emac editor, but when it comes to making, creating and editing files, I don't fully understand it. The help menu explains things kind of confusing.

Does anybody have a tut that explains in detail how to make files in emac, because I've been searching the net and can't seem to locate any.
________________________________________________________

Another question:

My server has no gui and I wanted to create a virtual file for my interface, which looks like this:


/etc/sysconfig/network-scripts/ifcfg-ra0

DEVICE=ra0
BOOTPROTO=dchp
IPADDR=192.168.0.100
NETMASK=255.255.255.0
NETWORK=192.168.0.0
BROADCAST=192.168.0.255
ONBOOT=yes
METRIC=10
MII_NOT_SUPPORTED=no
USERCTL=no
IPV6INIT=no
IPV6TO4INIT=no
PEERDNS=yes
NETMASK=255.255.255.0
IPADDR=192.168.100


I want to make it like this:

/etc/sysconfig/network-scripts/ifcfg-ra0:0

DEVICE=ra0:0
BOOTPROTO=dchp
IPADDR=192.168.0.101
NETMASK=255.255.255.0
NETWORK=192.168.0.0
BROADCAST=192.168.0.255
ONBOOT=yes
METRIC=10
MII_NOT_SUPPORTED=no
USERCTL=no


then restart my network.

If I can't make files and edit files I can't do anything else

All help is appreciated!!!
______________________________________________________
>>BLACKHOLE<<

>>BLACKHOLE<<

2007-(-_+)
 
Old 01-02-2007, 01:37 PM   #2
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Have you seen this?

http://www.gnu.org/software/emacs/manual/index.html

You can use other editors you know. If you don't like emacs, try something like vim. If you do try vim, this may help

http://www.tuxfiles.org/linuxhelp/vimcheat.html

Last edited by billymayday; 01-02-2007 at 02:18 PM.
 
Old 01-02-2007, 02:01 PM   #3
uselpa
Senior Member
 
Registered: Oct 2004
Location: Luxemburg
Distribution: Slackware, OS X
Posts: 1,507

Rep: Reputation: 46
Blackhole, when asking 2 completely unrelated questions, you should really create 2 threads, each one in the correct subforum. That will help you get better answers.
 
Old 01-02-2007, 09:51 PM   #4
>>BLACKHOLE<<
Member
 
Registered: Jun 2006
Location: In the bended light of the prism-
Distribution: Mandriva
Posts: 53

Original Poster
Rep: Reputation: 15
Thanks for the replys-
---------------------

Sorry for posting in the wrong forum. Sometimes I get confused on which question would fit which forum. Thanks for the advice.
________________
>>BLACKHOLE<<

>>BLACKHOLE<<

2007-(-_+)
 
Old 01-04-2007, 10:37 PM   #5
>>BLACKHOLE<<
Member
 
Registered: Jun 2006
Location: In the bended light of the prism-
Distribution: Mandriva
Posts: 53

Original Poster
Rep: Reputation: 15
hey guys-
--------

GOAL:

I'm trying to create the file:

/etc/sysconfig/network-scripts/ifcfg-ra0:0
DEVICE=ra0:0
BOOTPROTO=dhcp
IPADDR=192.168.0.101
NETMASK=255.255.255.0
NETWORK=192.168.0.0
BROADCAST=192.168.0.255
ONBOOT=yes
METRIC=10
MII_NOT_SUPPORTED=no
USERCTL=no
WIRELESS_MODE=managed
WIRELESS_ESSID=My Network
WIRELESS_ENC_KEY="restricted xxxxxxxxxxxxxxxxxxxxxxxxxx"
DHCP_CLIENT=dhclient


I open a buffer in emac via the command C-x C-f and key in the above code, but when I save it with the command C-x C-s
The bottom of the screen says:

/home/my-login/etc/sysconfig/network-scripts/ifcfg-ra0:0: no such directory
_____________________________________________________

I want this file as the virtual interface

Does anyone know the code to fix this problem???
THANKS in advanced for any help!

________________
>>BLACKHOLE<<

>>BLACKHOLE<<
2007-(-_+)
 
Old 01-05-2007, 12:01 AM   #6
kotnik
Member
 
Registered: Nov 2004
Location: Novi Sad, Serbia
Distribution: Debian, Slackware, Gentoo, openSuSE
Posts: 254

Rep: Reputation: 31
Emacs say that becose there's no network-scripts directory. Use "M-x make-directory" within emacs, or type this in your terminal:

mkdir -p /home/my-login/etc/sysconfig/network-scripts/
 
Old 01-05-2007, 12:58 AM   #7
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Are you sure? looks more like it's simply appending the directory structure to /home/%user

Try saving to absolure - ie /etc not etc
 
Old 01-05-2007, 01:21 PM   #8
>>BLACKHOLE<<
Member
 
Registered: Jun 2006
Location: In the bended light of the prism-
Distribution: Mandriva
Posts: 53

Original Poster
Rep: Reputation: 15
Thanks guys, Im gonna try both to see which one might work.
 
Old 01-05-2007, 06:34 PM   #9
kotnik
Member
 
Registered: Nov 2004
Location: Novi Sad, Serbia
Distribution: Debian, Slackware, Gentoo, openSuSE
Posts: 254

Rep: Reputation: 31
billymayday is right. State absolute path, not relative (absolute starts with /).
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
vcards from emac kabucek Linux - Software 0 11-14-2006 11:48 AM
eMac 1.25Ghz Saladen Linux - Hardware 1 08-29-2006 11:28 PM
linux games n tut patrick2323 Linux - General 3 06-23-2006 01:09 PM
sudo tut zchoyt Linux - Software 1 05-11-2005 10:53 AM
Mandrake 10.1 PPC on eMac Jan Legutko Linux - Hardware 5 03-12-2005 03:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:50 AM.

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