How do I open a text editor in a shell terminal?
I want to edit my /etc/rc.d/rc.local from my terminal window (vid card won't allow me to run 2 GUI's at once, ATI at it's FINEST)
I'm trying to get my Lisa Daemon running. I heard that if I add: if [ -x /opt/kde/bin/lisa ]; then echo "Starting LISa daemon..." /opt/kde/bin/lisa fi to rc.local it schould do the trick (yes my lisa script is at that location), is it just that easy or am I being set up for more trouble? but my main question is how do I open a txt editor from the shell console. running Slackware Kernel 2.6.13 |
Hi,
That should be easy. Open up a terminal and Code:
su - you need to do this since only root is allowed to write rc.local file. Code:
vi /etc/rc.d/rc.local press Esc key to enter into "insert" mode. Modes in vi are displayed in bottom right corner. <type in what you want> press Esc again to enter command mode Code:
:wq Tux, |
There are other editors, and they are most often easier to use than vi. emacs is installed on most linux boxes and jed is preferred by many. If you don't have jed type as root
<i> yum install jed</i> |
Forget about yum on Slackware, but kurtdriver is of course right. Vim is a moloch, it's a great but also difficult program for beginners. If you want to learn it try "vimtutor" which will guide you through your first steps with vim.
Another choice is Emacs, even simpler is pico (pine has to be installed to use it). |
I'm not a fan of VI (or emacs on the CLI), i use joe or pico/nano very straight forward.
|
The vi is too complex if you are unable to even open a basic command line text editor. What you need is nano , pico or joe .
|
Pine does not need to be installed in order to use pico, which is pine's editor. Pine does, however, require either nano or pico.
P.S. Pine is a great email client (pardon the change of topic)! |
vi isnt too hard if you have a printout of the man page handy, or dont mind switching virtual terminals a lot. And about two gui;s, how the heck would that work? two monitors? Only one X server can be running, and I think multiple displays using one monitor would be weird at best.
|
Don't use vi if you're a newbie. Really. Don't.
Type 'nano' for a nice, easy, intuitive text editor. Type 'nano <path to file>' to edit the file you want to edit. ctrl + x to quit, and then press s to confirm save. Like money, fame, and other good things in life, vi is incredibly powerful but hellishly difficult to manage. |
Quote:
let it load. switch to tty2, in my case I press Alt+Ctrl+F2 and type "startx -- :1" it's essentially the same Gui running twice.....nice thing is you can log into the first one as regular and the second one as root. |
All times are GMT -5. The time now is 04:59 AM. |