How to open A file with an editor through my shell
After installing samba I need to configure my file in /etc/samba/smb.conf I can simply double click and open the file, How can I view the file using my shell .... for example Do i have to specify the name of editor before the file name in order to view the file...
eg. root@Admin:/etc/samba# emacs smb.conf Thanks. |
Yes put the name of the editor before the filename you wish to open.
|
Thanks .. Just to know what is the common text editor for linux? Meaning that I will find in every machine.
|
I think that the answer for that is "vi". It would be in the 99% of the machines, nevertheless sometimes it is actually "vim" (vi improved) what you will run, even if you put "vi". The problem is that "vi" could be a little difficult in the beginning, so keep a browser handy to look how it works.
Other very common editors are "nano", "emacs" and "joe". |
slackware also have pico by default installed, which is really easy to use.
The command are displayed in the bottom of the pico. ^X means CTRL+X Most distros have either pico or nano which is a GNU pico - clone, but the default UNIX editor is vi. vi in slackware is a link to elvis, which is a vi clone like vim. vim is also installed Find a tutorial for vi. It's a really powerfull command-line editor. |
Re: How to open A file with an editor through my shell
Quote:
Code:
cat /etc/samba/smb.conf If you're actually configuring samba, check out (as root) Code:
system-config-samba Code:
firefox localhost:901 See the "network" forum here for more info (and help) |
Also, if you have xwindows running, you can probaly use 'gvim **FILE TO EDIT**'. This will open a vim in a window. But: you might not have gvim installed and you must be logged in as either root or the user you are graphicaly logged in as.
|
the easiest for me to work with right away is jed, but it is not installed by default.
There is a menusystem in the console so you don't have to remember commands |
Whichever editor you finally go with, I'd recommend learning at least the basics of 'vi', as it's pretty much guaranteed to be avail on any Unix/Linux/*BSD machine. You favourite may not be... and in commercial env's, you prob won't be allowed to download your own...
|
With the vi I can only view the file, I need to edit it as well.
|
Quote:
|
Check out this link: http://www.eng.hawaii.edu/Tutor/vi.html
|
I've been using vi for years and you've just lost me!
|
All times are GMT -5. The time now is 09:05 AM. |