How to Edit Files on Your Raspberry Pi
The Raspberry Pi desktop includes an editor, which you can use to make small changes to the Pi. For example, how to make your Pi easier to use on a network.
To edit a file using the Leaf text editor, start by clicking the taskbar Menu button and drag the mouse over the Accessories item. Move it to the right and down a bit and click the big green leaf icon labeled Text Editor.
The text editor loads with a blank window. You can type text into the window with your keyboard, edit the text with your keyboard and mouse, and choose File → Save As to save the file.
You can also load an existing file by choosing File→Open. The editor displays a file selector.
The selector works a bit like a smaller version of File Manager. It has a list of folders and shortcuts at the left and a window showing the files in each location at the right.
But it doesn’t show the super-important folder named /. Instead, it has a shortcut labeled File System, — which takes you to / because / is the file system.
Double-click File System and work your way through the folders to
Double-click the file named interfaces, as shown in the following figure. You can also click the file once and then click the Open button.
See those buttons above the folder and file area? Every time you double-click a folder to open it, the file selector adds it as a button. The buttons are a super-speedy shortcut feature. Click a button to go straight to that folder. You’ll also see a Recently Opened list in the file area. The file selector remembers the files you worked on recently, so you don’t have to find them again — you can double-click the name of the file instead.
The editor loads the file. You’ll see some cryptic computer gobbledeegook, as shown in the following figure. The gobbledeegook is a collection of magic words. They tell your Pi how to connect to the local network and the Internet.
If you know the right magic words, you can edit the file to make your Pi work differently.
Linux is more hands-on than Windows or OS X, and a lot of important settings are hidden in text files.
How do you know which file to edit, and how to change it? You don’t. Linux is complicated. You will never, ever be able to guess how to find most of its settings or how to change them after you find them.
You have to look them up online. Whenever you want to change a setting in your Pi, search online for instructions.
This isn’t cheating! Professional developers do it all the time when they don’t know how to do something. It’s not as neat and easy as changing a few settings in a preferences panel. But once you figure out how to do it, you can customize your Pi and make it do things you can’t do with other computers.