# Read-only file, not written; use ! to override.



## free-man20101 (Mar 22, 2010)

hello

i cant edit this file

```
vi /etc/rc.conf
```
if used
esc and :w
show me


```
Read-only file, not written; use ! to override.
```


or :w!

how i can edit this file

thanks


----------



## fronclynne (Mar 22, 2010)

You have to be root to edit that file.

Another possibility is that you are in single-user mode, and your root filesystem is mounted read-only, in which case, you need to `# mount -u -w /` before you edit it.


----------



## free-man20101 (Mar 22, 2010)

thanks your reply
but how used this ?
`# mount -u -w /`
`$ mount -u -w`


```
/dev/ad6s1a on / (ufs, local)
devfs on /dev (devfs, local)
/dev/ad6s1g on /home (ufs, local, soft-updates)
/dev/ad6s1d on /tmp (ufs, local, soft-updates)
/dev/ad6s1e on /usr (ufs, local, soft-updates)
/dev/ad6s1f on /var (ufs, local, soft-updates)
```


----------



## DutchDaemon (Mar 22, 2010)

Are you, in fact, in single-user mode? Or else those mount commands have no real value.

Post the output of:

1. [cmd=]ls -alo /etc/rc.conf[/cmd]
2. [cmd=]id[/cmd]


----------



## graudeejs (Mar 22, 2010)

mount -uo rw /


----------



## free-man20101 (Mar 22, 2010)

DutchDaemon said:
			
		

> Are you, in fact, in single-user mode? Or else those mount commands have no real value.
> 
> Post the output of:
> 
> ...




```
$ ls -alo /etc/rc.conf
-rw-r--r--  1 root  wheel  - 545 Mar 19 22:03 /etc/rc.conf
```



```
$ id
uid=1001(admin) gid=0(wheel) groups=0(wheel)
```



			
				killasmurf86 said:
			
		

> mount -uo rw /





```
$ mount -uo rw /
mount: /dev/ad6s1a : Operation not permitted
```


----------



## gilinko (Mar 22, 2010)

free-man20101 said:
			
		

> $ id
> uid=1001(admin) gid=0(wheel) groups=0(wheel)



Which indcates that you aren't root when you are trying to edit the file, so as said by *fronclynne* you have to be root to be allowed to edit that file(ie you have to be root to be able to save it from whithin vi). The mount commands given is for when you are in single-user-mode, not when the system is fully booted.


----------



## free-man20101 (Mar 22, 2010)

gilinko said:
			
		

> Which indcates that you aren't root when you are trying to edit the file, so as said by *fronclynne* you have to be root to be allowed to edit that file(ie you have to be root to be able to save it from whithin vi). The mount commands given is for when you are in single-user-mode, not when the system is fully booted.



im new with freebsd

how do i do this?


----------



## DutchDaemon (Mar 22, 2010)

[cmd=]su -[/cmd]

Enter the root password. You're now root (with a # prompt instead of a $ prompt), as [cmd=]id[/cmd] will tell you.


----------



## gilinko (Mar 22, 2010)

How you become root? Type `$ su` in the terminal and you will have to give root's password that you set during the install of the system.

However if you are completly new to any form of unix like system, I would strongly suggest that you first of all read the FreeBSD Handbook. Read all of it, however focus on chapter 3, 4, 5, 11 and 13. And use google to find some general freebsd/linux/unix tutorials.


----------



## free-man20101 (Mar 22, 2010)

thanks

now how add more ip


----------



## DutchDaemon (Mar 22, 2010)

Not in this topic anyway.


----------



## free-man20101 (Mar 22, 2010)

where 
in any forum


----------



## DutchDaemon (Mar 22, 2010)

Networking questions are predictably asked in the Networking forum.


----------



## free-man20101 (Mar 22, 2010)

thank you


----------

