how to use gedit,
Linux users normally edit configuration files with terminal-based
tools like nano and vim . If you want to edit a file graphically—even a system
file—the gedit text editor makes it painless and easy.
Launching gedit
To start gedit from the command line, type gedit and hit
Enter.
The gedit text editor will appear shortly.
Opening an Existing File
To open an existing text file click the “Open” button in the
gedit toolbar. You can also press Ctrl+O to open a file.
Opening a File from the Command Line
You can ask gedit to open a file as soon as it launches by
providing the filename on the command line. This makes gedit load the file so
that it is ready to be edited as soon as gedit appears.
gedit ana.c
Saving Changes to a File
To save your changes, click the “Save” button in the
toolbar. You can also press Ctrl+S to save the file.
Editing System Files
To edit a system file, you will usually need to use sudo
because the owner of the file is likely to be root. To be strictly accurate
you’ll be able to open a system file even if you don’t use sudo, but you won’t
be able to save any changes back to the file unless you have used sudo.
sudo gedit /etc/samba/smb.conf