Debian This forum is for the discussion of Debian Linux.
|
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
|
10-13-2004, 10:47 PM
|
#46
|
|
Senior Member
Registered: Mar 2004
Distribution: Debian GNU/kFreeBSD
Posts: 1,597
Rep:
|
It would be very nice indeed if all people knew how to use the "vi" text editor. http://www.cis.ksu.edu/~bhoward/vi/ But in Debian you don't actually need "vi" because the basic installation of Debian comes also with another text editor, "nano", that is even nicer than "vi" because it has in-built instructions how to use it. What would you do if you hadn't used computer for some time and had forgot the basic commands of "vi"? OK, you can always type "man vi" and spend some time re-learning "vi". But, if you're in a hurry, you just need to remember the name of that other text editor in Debian, "nano", and that is enough. "nano" itself tells you how to use it.
But if you get a fancy to install some flavour of *BSD, for instance, it's good to know how to edit files with "vi" because, unlike "nano", "vi" is available in ALL Unix-like systems. So, macondo's basic tutorial on how to edit files with "vi" is very useful indeed -- even if you prefer to use "nano" after all. 
Last edited by Dead Parrot; 10-23-2004 at 05:44 AM.
|
|
|
1 members found this post helpful.
|
10-13-2004, 11:03 PM
|
#47
|
|
Senior Member
Registered: Dec 2001
Location: 35.7480° N, 95.3690° W
Distribution: Debian, Gentoo, Red Hat, Solaris
Posts: 2,070
Rep:
|
I use vi (or vim) every single day. It's so easy, especially when you do quick editing. It doesn't take very long to get used to and I don't have to open a gui window
All you really have to know.
i - to insert text
o - to open a new line below the current one to insert text.
ESC - to get back to command mode
u - to undo
yy - to copy current line
yw - to copy current word
p - to paste after cursor
P - to paste before cursor
:w to save
:wq to save and exit
0 - to go to begnning of currenet line
$ - to go to end of current line
w - to go to next word
G - to go to end of file
1G - to go to first line in file.
ctrl+b - to bo back one screen
ctrl-f - to go forward one screen
It seems like it would be hard to learn but once you try, it is easy. And then later you learn that replacing text is much easier with a sed script
I work on a lot of servers where there is no gui and no nano, etc. So you HAVE to know vi. And it does pay to know 
|
|
|
|
10-14-2004, 08:29 AM
|
#48
|
|
Senior Member
Registered: Jul 2003
Location: Panama
Distribution: Debian Sid
Posts: 1,013
Original Poster
Rep:
|
Thank you Darthtux and Dead Parrot. That was pretty good, and yet nobody has explained Nano, which is used by many people, i just wanted to cover that so newbies could start somewhere
Let's say i want to edit a file:
#nano /etc/modules
once there, do i need to change modes? if so, what's the key combo?
once the file is edited, how do i get out of there, save and exit? That's all.
|
|
|
|
10-14-2004, 09:42 PM
|
#49
|
|
Member
Registered: Apr 2004
Distribution: Debian SID and Woody
Posts: 77
Rep:
|
2 or 3 things I would like tom see added to the Config post Install doco
"apt-get install nano" for an easy to use text editor
One thing that's missing (for me anyway) is automatic updating via cron of your Debian system a la Windows Update and then email the results of the process to another account. When installed to the hard disk Knoppix automatically does this but Debian Sarge doesn't.
"apt-get update" to refresh your packages list
"apt-get upgrade' to fetch and install new packages and security fixes
I don't know how to automate this process via a CRON job and I don't know how to send the results via email. There is thread here http://www.linuxquestions.org/questi...light=cron+apt that sort of shows how to apt-get via cron but no email notifications.
Anybody ?
Last edited by debian_dummy; 10-14-2004 at 09:55 PM.
|
|
|
|
10-14-2004, 10:10 PM
|
#50
|
|
Senior Member
Registered: Dec 2001
Location: 35.7480° N, 95.3690° W
Distribution: Debian, Gentoo, Red Hat, Solaris
Posts: 2,070
Rep:
|
Quote:
Originally posted by macondo
Let's say i want to edit a file:
#nano /etc/modules
once there, do i need to change modes? if so, what's the key combo?
once the file is edited, how do i get out of there, save and exit? That's all.
|
Nano can be started with several options. A few are
-i autoindent
-c display cursor position at bottom of screen
-m enable mouse to select text
Nano doesn't have "modes" like vi.
Nano has its key combinations at the bottom of the screen. The ^ character stands for the control key. The most important is ^G which gives all the shorcuts and their meaning.
There are several Meta(Alt) key combinations which switch certain features on and off. To see them ^G.
To save ^O and save the file name and ^X to exit.
|
|
|
|
10-15-2004, 01:48 AM
|
#51
|
|
Member
Registered: Jun 2004
Distribution: Ubuntu
Posts: 185
Rep:
|
Quote:
Originally posted by debian_dummy
I don't know how to automate this process via a CRON job and I don't know how to send the results via email. There is thread here http://www.linuxquestions.org/questi...light=cron+apt that sort of shows how to apt-get via cron but no email notifications.
Anybody ?
|
I have a very simple backup script (basically I make a bzip2/tar-ball of some important directories that I specify) that I run weekly with cron. The script also notifies my user with an e-mail.
To get the script to run weekly (exactly what time and day doesn't matter for me) I simply place the script in /etc/cron.weekly/
The e-mail notification is in the script itself with the follwing command:
Code:
echo "blah blah blah" | mail -s "some subject" user_to_be_emailed
It shouldn't be too hard to make the updates work. Though I prefer the interactivity to select what I want to update (or not).
Hope this helps,
/TLV
|
|
|
|
10-15-2004, 08:54 AM
|
#52
|
|
Senior Member
Registered: Jul 2003
Location: Panama
Distribution: Debian Sid
Posts: 1,013
Original Poster
Rep:
|
"To save ^O and save the file name and ^X to exit."
OK, i edited a file, did:
Ctrl+O
Ctrl+X
the last command did not work, i finally closed it, and checked back and the changes were not implemented, what did i do wrong?
|
|
|
|
10-15-2004, 09:01 AM
|
#53
|
|
Senior Member
Registered: Dec 2001
Location: 35.7480° N, 95.3690° W
Distribution: Debian, Gentoo, Red Hat, Solaris
Posts: 2,070
Rep:
|
When you do ^O look at the bottom of the screen. It says "File Name to Write:" . You have to name it and press ENTER. Or if you opened a file, it will put its name there and you just press ENTER. Then you press ^X. If you just pressed ^X, It said "Save modified buffer (ANSWERING "No" WILL DESTROY CHANGES)". You have to press "Y" to get back to the File Name to Write:" to enter a file name.
|
|
|
|
10-15-2004, 09:24 AM
|
#54
|
|
Senior Member
Registered: Jul 2003
Location: Panama
Distribution: Debian Sid
Posts: 1,013
Original Poster
Rep:
|
Thanks a lot Darthtux, it worked like a charm! Learned one more thing today. 
|
|
|
|
10-16-2004, 04:31 PM
|
#55
|
|
Member
Registered: Sep 2002
Location: Wichita Falls, TX
Distribution: tried a lot of 'em, now using kubuntu
Posts: 180
Rep:
|
Automatic updates are accomplished via the cron-apt tool.
apt-get install cron-apt
Then read the man page. Default configuration is to download only, but you CAN change this to download and install.
HTH
|
|
|
|
10-23-2004, 10:24 AM
|
#56
|
|
LQ Newbie
Registered: Aug 2004
Location: St. Louis, Mo.
Distribution: SuSE 9.0, Knoppix, Mandrake 10.0, Redhat 9
Posts: 11
Rep:
|
Wow! you guys have saved me hours of  and made this  install much easier. Answered a lot of  I didn't even know I should ask!
|
|
|
|
10-23-2004, 02:26 PM
|
#57
|
|
Senior Member
Registered: Jul 2003
Location: Panama
Distribution: Debian Sid
Posts: 1,013
Original Poster
Rep:
|
Automatic Shutdown
This is a problem that has been bugging me for a couple of years. Every time i install a distro, i can't shut it down completely, it usually works half of the time, except with Libranet, it's the only distro that shuts it down completely ALL the time.
I've spent hours (literally) searching Google and forums all over the net, the debian-user-mailing lists in english, portuguese, spanish and italian, plus, the IRC debian channels, #linuxhelp, and every geek i casually meet. The problem is my motherboard, it's an Intel 440something and the BIOS is circa 1998, it has never been flashed, i bought this box (PII 266) second hand. I have tried everything under the sun and nothing. I have used different commands to shut it down:
shutdown -h now
poweroff
halt -p
different lines on the kernel stanza in the grub/menu.lst and /etc/modules:
apm=on apm=off
apm=power-off
apm power_off=1
noapic
acpi=off
At best it would shut down 70 percent of the time.
It would just give this message at the end:
Flushing IDE devices: hda hdb hdc hdd
Power down
until now...
I suspect there is a ton of people with the same problem out there, there is no guarantee this will work for you, it worked for me, i'm a happy camper.
It was accidental, really. Last weekend i was bored. I decided to wipe the my hard drive clean and install Sarge with pre-rc2 debian-installer, i was using sid at the time.
I inserted the cd and went thru every option they had, by pressing the Fn keys, looking at everything, something i had neglected before. I knew i did not want the 2.6 kernel on my decrepit box, i wanted to make a newbie installation just to see how the other half lives; so at the boot prompt, i ended up with:
linux noapic nolapic noframebuffer (i can't remember the full string for it)
and away i went, after installing
the basics,
apmd (new trick)
icewm
i tried to shut it down, with:
#shutdown -h now
and it shut down completely the first time, no less. I tried 6 times, and it never failed. Then i installed Blackbox, it shutdown too, perfect (5 times), it's been a week now, and it hasn't let me down.
I just wanted to share this, in case there is some people in the same boat.
Edit: a week later i reinstalled (surprise) and this time installed Sarge with the kernel 2.6, no problem, so now i use kernel 2.6.8 for the first time.
Last edited by macondo; 10-25-2004 at 08:40 AM.
|
|
|
|
10-23-2004, 04:50 PM
|
#58
|
|
Member
Registered: Jun 2004
Distribution: Ubuntu
Posts: 185
Rep:
|
Re: Automatic Shutdown
Quote:
Originally posted by macondo
... nolapic ...
|
And I'm pretty sure this is the one that did it for you. "nolapic" stands for No Local Advanced Programmable Interrupt Controller. I used to have to add that parameter to my kernel to get my laptop to power down completely. These days I just do not compile "Local APIC support" into the kernel.
Not sure why it messed up the complete halt of a system.
/TLV
|
|
|
|
10-23-2004, 07:18 PM
|
#59
|
|
Senior Member
Registered: Jul 2003
Location: Panama
Distribution: Debian Sid
Posts: 1,013
Original Poster
Rep:
|
TLV said:
"And I'm pretty sure this is the one that did it for you."
Boy, i'm glad this is over.
BTW, today WindowMaker came out with its latest version 0.90.0
http://www.windowmaker.org/
Dead Parrot must be jumping up and down. 
Last edited by macondo; 10-23-2004 at 07:38 PM.
|
|
|
|
10-24-2004, 12:19 AM
|
#60
|
|
Senior Member
Registered: Mar 2004
Distribution: Debian GNU/kFreeBSD
Posts: 1,597
Rep:
|
Quote:
Dead Parrot must be jumping up and down.
|
You can count on that.
Window Maker 0.91.0 is now in unstable.
To make fonts look good you need to turn on antialiasing in WPrefs.app (select "Smooth font edges").
Last edited by Dead Parrot; 11-17-2004 at 10:58 AM.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 04:45 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|