You are not logged in.

#1 2007-10-02 13:57:14

xelados
Member
Registered: 2007-06-02
Posts: 314
Website

A Good Practice Guide for Newbies

I know that I'm still fairly new to Arch (and Linux in general) compared to some of the people here on the forums, but I think it'd be a great idea if we came up with a list of 'good ideas' for new users to consider. You know, general quick-fixes that would prevent headaches or raging fits. I'll start things off with a few that I picked up myself:

1. Alias your file management commands. (rm, cp, mv)
If you do a lot of work in the terminal, you're likely to try moving, copying, or deleting files with it. At first it comes easy, but those of us who have gotten too zealous soon realized that it can lead to disaster if you aren't completely certain of what file(s) you are working with. A really simple fix can save you from yourself, so to speak. Simply add the "-i" option onto your commands to turn them interactive, which will make the shell ask you what you want to do.

$ alias rm "rm -i"
$ alias cp "cp -i"
$ alias mv "mv -i"

After that, just log out and log back in, or do a "source /etc/profile". Note, however, that the -f option might over-ride the -i option. 'sudo' is also unaffected by these aliases. You can alternatively put these commands in your ~/.bashrc.

2. Optimize your 'ls'ing.
If you're like me, you tend to want specific information when you 'ls' instead of the default listing of files. So what you do is 'man ls', figure out what you prefer to see in a directory listing, and alias it to ls:

$ alias ls "ls -Ahl --group-directories-first --color=auto"

The above is just an example of what you can do. As with #1, simply 'source /etc/profile' or logout and log back in to make it take effect. Again, you can also put this in your ~/.bashrc.

----
Well, that's all I can come up with for now. Hopefully others will take interest in this and add onto it. If this is the wrong place on archlinux.org to put this, I'd appreciate it if someone could point me in a direction where I could put this.

Offline

#2 2007-10-02 14:07:09

Cerebral
Forum Fellow
From: Waterloo, ON, CA
Registered: 2005-04-08
Posts: 3,108
Website

Re: A Good Practice Guide for Newbies

Just a note, aliases take effect from the moment you define them - you don't need to re-source /etc/profile.

If you put them in your ~/.bashrc, then just re-source your ~/.bashrc. wink

Good tips, btw.  Might be worth a new article in the wiki, linked from the beginner's guide.

Offline

#3 2007-10-02 14:27:39

SleepingGiant08
Member
From: Ellicott City, MD USA
Registered: 2007-01-10
Posts: 124

Re: A Good Practice Guide for Newbies

very nice smile should definately put this in the wiki


Registered Linux User #439761

Offline

#4 2007-10-02 16:46:53

dolby
Member
From: 1992
Registered: 2006-08-08
Posts: 1,581

Re: A Good Practice Guide for Newbies

tbh i dont agree with this.
such customisation is achieved only by usage. plus the internet is full of tutorials and tips and preconfigured dotfiles. only thing thats certain to happen is ppl not reading manpages.
also almost all newbies rarely touch the command line. even if arch due to pacman forces the user to visit the command line more than most other distros
-1

Last edited by dolby (2007-10-02 16:51:10)


There shouldn't be any reason to learn more editor types than emacs or vi -- mg (1)
[You learn that sarcasm does not often work well in international forums.  That is why we avoid it. -- ewaller (arch linux forum moderator)

Offline

#5 2007-10-02 17:24:14

Crooksey
Member
From: UK ~
Registered: 2006-08-14
Posts: 415
Website

Re: A Good Practice Guide for Newbies

I agree with dolby, there are so many dotfiles out their for people to use and so many howto's, people just copy and paste the stuff into the shell.

The most fun I had with learning linux was trial and error, this I feel is allot more rewarding, but adding another page to the wiki is sure to help someone smile

+1/0


Arch Linux since 2006
Python Web Developer + Sys Admin (Gentoo/BSD)

Offline

#6 2007-10-02 19:44:51

mcmillan
Member
Registered: 2006-04-06
Posts: 737

Re: A Good Practice Guide for Newbies

An argument against this that I've seen which I buy is that aliases like that make it easy to get too reliant on the safety feature, then when if you end up working on a system that doesn't have your customizations it's easier to screw up since you don't think as carefully about what you're doing. I do have similar aliases, but as ri, ci and mi, and train myself to use those more.

Offline

#7 2007-10-02 21:00:44

SleepingGiant08
Member
From: Ellicott City, MD USA
Registered: 2007-01-10
Posts: 124

Re: A Good Practice Guide for Newbies

All i meant was that the tips provided, and if they were on the wiki, will surely help a newbie out, but like Crooksey said you learn the most through trying things out (at least that helped me out).

So i half take my vote back, now that I thought about what you all said.


Registered Linux User #439761

Offline

#8 2007-10-03 11:10:56

xelados
Member
Registered: 2007-06-02
Posts: 314
Website

Re: A Good Practice Guide for Newbies

Wow, I didn't expect to get this much feedback.

I agree that experience is the best teacher, but does someone really have to lose all the data under / or another directory to learn to be careful with rm? I think maybe if I (or we) found a way to provide the tips with a sidenote saying "This is no substitute for reading manpages and learning on your own", it would please all the parties involved.

mcmillan: That's actually a good idea that I never thought of. I might change my aliases to the same. smile

Last edited by xelados (2007-10-03 11:13:30)

Offline

#9 2007-10-03 11:54:33

dolby
Member
From: 1992
Registered: 2006-08-08
Posts: 1,581

Re: A Good Practice Guide for Newbies

xelados wrote:

Wow, I didn't expect to get this much feedback.

I agree that experience is the best teacher, but does someone really have to lose all the data under / or another directory to learn to be careful with rm? I think maybe if I (or we) found a way to provide the tips with a sidenote saying "This is no substitute for reading manpages and learning on your own", it would please all the parties involved.

noone said u couldnt start a wiki page about it. im sure some ppl will contribute wink

Last edited by dolby (2007-10-03 11:55:38)


There shouldn't be any reason to learn more editor types than emacs or vi -- mg (1)
[You learn that sarcasm does not often work well in international forums.  That is why we avoid it. -- ewaller (arch linux forum moderator)

Offline

#10 2007-10-03 12:40:49

foxbunny
Member
From: Serbia
Registered: 2006-10-31
Posts: 759
Website

Re: A Good Practice Guide for Newbies

Maybe you could also add this to the Beginners guide.

http://wiki.archlinux.org/index.php/Beginners_Guide

Offline

Board footer

Powered by FluxBB