Cannot edit files using nano?
Hey, I'm pretty new to Arch, and this may be a super easy fix and I could just be stupid for not seeing it earlier.
I am trying to get access to /etc/netctl/examples in order to help me automatically connect to wifi.
The problem is, whenever I try to access it using nano (sudo nano /etc/netctl/examples) it comes up as a blank document, which I am 99% sure is not supposed to be the case.
Any help will be greatly appreciated.
Edit: I got everything working. Im not sure what the rules are for leaving posts up, but Im going to leave it up in case there are any resources here that others can use.
Edited 11 Apr 2015. We only hold this version.
About this post
- Posted
- Archived
- Edited
- Score
- 0 · 100% up
- Kind
- Text
- ID
- 329cyl
17 comments
It's blank because the document doesn't exist. I'm not sure how netctl works, but it sounds like it isn't installed and that's why there's no file there. cd to /etc/netctl/ and then type ls and see if it says there are any files there.
There are files in the /etc/netctl path. examples, hooks, and interfaces.
Also, I have no clue what you mean by "cd to". (I seriously apologize for the newness).
So examples does exist. Are you sure it's not a directory? If it is a file, and you type
and it's blank, then I don't know how to help you, sorry. Google is your friend!
BTW, cd is the command for change directory, it's how you navigate via terminal. Don't worry, I'm actually pretty new to this too!
cd = change directory
"cd" is the command needed to change directory in the terminal.
if I'm starting in the /home directory and my user us ldl2 and I'd like to go into that directory I'd type
cd ldl2
I could also type
cd /home/ldl2
the difference here is the full path name v one which assumes which folder I've started in.
Use ls function in netctl directory to confirm that the /examples file exists.
Edit: Just checked my system and /etc/netctl/examples is a directory not a file. Try:
and you'll see what I mean.
Ah, ok, I see what you mean.
What I'm trying to do is set up a profile like what it says in the wiki here, which requires me to copy one of the profiles to /etc/netctl, how would I do that?
Pretty new to this myself and I don't think I had to set that up for my system because I installed in a VM.
You can use cp to copy a file:
then,
Try
sudo nano /etc/netctl/examples/<tab>(<tab> means pressing the tab on your keyboard). Your shell should suggest you what files are in the directory. Then use tab multiple times to select which file you want.Use
cdandlsa lot. Seriously, you won't be comfortable with anything in the command line until you know how to navigate within your directories just like you would with any file explorer. Also look atpwd,cat,find,less,head,tail,du,wc, these tools are great complements.I havent heard of the other ones, but I am pretty familiar with ls, and I'm using cd more extensively now. Thanks for the tip!
In a few months, you'll find out that command line is way simpler and faster for most of the use cases you'll encounter with a computer. Keep learning, we're all learning new things everyday here !
Cd into the directory containing the file you want to view/edit to check the path and spelling of the file name or do a less /path/to/file as another way to check the validity of your spelling /name of the file. Edit: for spelling
Alright, so I got everything working correctly.
Apparently, I didnt even need to go into /etc/netctl/examples, my wifi profile was in /etc/netctl. The only thing I had to do was netctl enable (profile name here)