Click to See Complete Forum and Search --> : Top 20 Concole Commands


cbfunky
07-16-2001, 12:27 PM
Hi,

what would you consider your top 10 or top 20 commands that you consider mandatory to know when working with the shells?

cbfunky

mrBen
07-16-2001, 12:35 PM
Hmmm tricky. I'm just a newbie, but here are some that I use the most(in no particular order) :

ls
rpm (if on Mandrake), or
apt-get (if on Debian)
tar
chmod
shutdown -h now
su
cd
mount
vi
startx :p

Gray_Race
07-16-2001, 12:49 PM
I can tell you my least favorite.

rm -rf /

jscott
07-16-2001, 12:54 PM
logout being the most important...

Derango
07-16-2001, 01:12 PM
Originally posted by Gray_Race:
<STRONG>I can tell you my least favorite.

rm -rf /</STRONG>

Just a note to any cluless newbies (not pointing at anyone in particular) This command is a "Very Bad Thing"...don't run it :D

jscott
07-16-2001, 01:14 PM
Originally posted by Derango:
<STRONG>Just a note to any cluless newbies (not pointing at anyone in particular) This command is a "Very Bad Thing"...don't run it :D</STRONG>

Don't run it as root. This is a prime example of why you should use the root account only when needed!

Strike
07-16-2001, 01:20 PM
Originally posted by jscott:
<STRONG>logout being the most important...</STRONG>

Actually, I never use logout. exit is aliased to it for me, so I use that - it's shorter :)

20 in no particular order:

ls
cd
more
grep
find
which
cat
echo
sudo &lt;something&gt;
aptitude (though this is just a keybind for me now)
vim
ssh
ncftp &lt;hostname&gt;
w3m &lt;url&gt;
startx
awk
df
free
top
ps(tree)

cbfunky
07-16-2001, 01:21 PM
Originally posted by Gray_Race:
<STRONG>I can tell you my least favorite.

rm -rf /</STRONG>

Did you actually use that once??

Derango
07-16-2001, 01:24 PM
Originally posted by jscott:
<STRONG>Don't run it as root. This is a prime example of why you should use the root account only when needed!</STRONG>

Exactly...one mystype ("rm -rf / home/user" will produce the same results as "rm -rf /") can whipe your whole system (including any windows partitions you have mounted) with one command. Never run as root unless you need to for somthing

cbfunky
07-16-2001, 01:31 PM
Originally posted by mrBen:
<STRONG>here are some that I use the most:

...
shutdown -h now
...</STRONG>

doesn't "halt" do the same thing?

Gnu/Vince
07-16-2001, 01:34 PM
ls
cd
grep
vim
ps
top
w
uname -a
cat
cp
mv
rm
ssh

Gray_Race
07-16-2001, 01:35 PM
Originally posted by cbfunky:
<STRONG>Did you actually use that once??</STRONG>

Thankfully no, but I've heard many a horror story.

Just for people who don't know. If you run that command as root, you will delete everything on your hard drive. The -r means that it is recursive, going through every directory, and the -f means it will force it, do it all without any prompts. Only way to stop is ctrl + c and you'll still lose some information based on how fast you press the buttons, so don’t run speed tests. :(

Strike
07-16-2001, 01:41 PM
can't forget:

cowsay
(and now) figlet (GnuVince's find)

cbfunky
07-16-2001, 01:56 PM
Originally posted by Strike:
<STRONG>
cowsay
(and now) figlet (GnuVince's find)</STRONG>

Ok, these two I couldn't find, what do they do?

And for all those worried faces: I surely won't execute an unknow command (which (what a surprise!) wasn't even the case here) without consulting some manpages first.
I might be stupid, but I'm not THAT stupid
:p

Derango
07-16-2001, 01:58 PM
Originally posted by cbfunky:
<STRONG>Ok, these two I couldn't find, what do they do?

And for all those worried faces: I surely won't execute an unknow command (which (what a surprise!) wasn't even the case here) without consulting some manpages first.
I might be stupid, but I'm not THAT stupid
:p</STRONG>

I knew you wouldent...but there are others out there who would.

Cowsay prints out a ascii cow who says somthing in a voice bubble...don't know about the other one though.

recluse
07-16-2001, 02:07 PM
Umm
apt-get social-life-1.0 , never acutually tried it but if it worked it could be fun, though it would be quickly followed by a
dpkg --remove social-life-1.0
seriously I like
less
top
find

-geordan

jbstew32
07-16-2001, 02:20 PM
ls
cd
mount
chmod
grep
cat
tar
su
pico/nano (whatever is available)
rm
mv
cp
ftp
telnet
find
shutdown -h now
make
installpkg
removepkg
upgradepkg

:cool: Slackware :cool:

cbfunky
07-16-2001, 02:52 PM
This is not fair, I tried cowsay in every shell I know (which aren't that many but whatever), and it didn't work :( .
Might this be distro specific??

I want to see that cow!!

Derango
07-16-2001, 03:01 PM
Originally posted by cbfunky:
<STRONG>This is not fair, I tried cowsay in every shell I know (which aren't that many but whatever), and it didn't work :( .
Might this be distro specific??

I want to see that cow!!</STRONG>

Try a google search for it. It normaly doesn't come with a distro.

slacker_x
07-16-2001, 03:19 PM
nobody has mentioned "du" yet. I use that quite a bit.

nick098
07-16-2001, 03:24 PM
my most used commands are:
cd
-and-
..
and my least favorite is:
rm -rf /
but my favorit in dos is
format c:

twofoolish2b
07-16-2001, 03:33 PM
gawk, date, finger, wait, unzip, touch, nice, suck, strip, mount, fsck, umount, make clean, sleep. :D

cbfunky
07-16-2001, 04:05 PM
ok, I downloaded that cowfile, but how do I unzip *.deb files if not on a debian system?

Derango
07-16-2001, 04:20 PM
Originally posted by cbfunky:
<STRONG>ok, I downloaded that cowfile, but how do I unzip *.deb files if not on a debian system?</STRONG>

You probably need a program called Alien, that converts betwen package formats. It might be installed already...if not, try google again ;)

cbfunky
07-16-2001, 04:36 PM
Using alien gives me A LOT of error messages

Derango
07-16-2001, 04:38 PM
Originally posted by cbfunky:
<STRONG>Using alien gives me A LOT of error messages</STRONG>

hmmm...maybe someone else can help you then, I'm not too familiar with alien.

Derango
07-16-2001, 04:39 PM
Try here for a tar.gz file of cowsay

ftp://ftp.nog.net/pub/tony/cowsay/cowsay-3.03.tar.gz

Strike
07-16-2001, 04:40 PM
Recipe for using deb's on a non-Debian system (with the additional note that deb's were designed so that ANY Unix system could use them, though only dpkg/apt maintain the nice dependency database and all that):

1. ar x &lt;package&gt;.deb
This will create three new files: debian-binary, control.tar.gz, and data.tar.gz
debian-binary - seems just to be what version of the package system it uses or something like that. Mine simply contained "2.0" for a recent one. It's unimportant for this type of extraction though.
data.tar.gz - the meat of the application, all of the data files for the program are in here, and this will be what most of the size of the deb is made up of
control.tar.gz - pre/post-installation/removal scripts, md5sums, a list of config files, and the file that describes the deb (control)

2. mv data.tar.gz /
All the paths in data.tar.gz are relative to the root directory (because they are made using fakeroot), so we want to move it here before extracting

3. cd /
Get into the root directory, duh.

4. tar xvfz data.tar.gz
You might skip "v" on this one for big packages, because it lists the files being extracted.

And, you are done. It is installed on your system, so to speak. You might want to unzip control.tar.gz (tar xvfz control.tar.gz) and take a look at the pre/post-installation scripts to see if there's anything that needs to be done. Or you can just extract them and run them.

mychl
07-16-2001, 05:23 PM
pico
su
cd
startx
vmware-config.pl
mount
ls
df
rpm
tar
man
HELP
exit
Ctrl+Alt+Bkspce
Alt+F1-F6
Alt+F7
fsck hda1
shutdown -h now

nuisance
07-16-2001, 05:51 PM
df
ls
ps
chmod
chown
chgrp
grep
rpm
tar
make
kill
man
su
rm
mv
cat
cd
mount
cp
locate

[ 19 July 2001: Message edited by: nuisance ]

Radar
07-16-2001, 06:48 PM
Originally posted by Strike:
<STRONG>Actually, I never use logout. exit is aliased to it for me, so I use that - it's shorter :)


</STRONG>

I use CTRL + D to do these.

Gnu/Vince
07-16-2001, 11:05 PM
Originally posted by Strike:
<STRONG>can't forget:

cowsay
(and now) figlet (GnuVince's find)</STRONG>

Heh!

Gray_Race
07-16-2001, 11:13 PM
Cowsay is fun, but if you want to go simple, without downloading anything just type in:
fortune

And it will tell you the meaning of life. hehe

Cheeves
07-16-2001, 11:28 PM
well lately its been hformat /dev/hdc5 -- dont ask

cbfunky
07-17-2001, 10:42 AM
Originally posted by Gray_Race:
<STRONG>Cowsay is fun, but if you want to go simple, without downloading anything just type in:
fortune

And it will tell you the meaning of life. hehe</STRONG>

I found a couple of codelines in some config file a couple of days ago that said "remove # if you want fortune" or so, and so I did.
However, fortune isn't working either.

StanLin
07-17-2001, 11:16 AM
ls -l
ps -ax
kill
mkisofs
cdrecord
su
telnet
cp
logout
who
whoami
top
chmod
cd
mount
man
df -h
less
poweroff
slocate

evulish
07-17-2001, 03:25 PM
man
info
mount
lynx
ftp
rm
cp
ls
cd
df
du
find
grep
vi
g++/gcc/cc or whatever
apt-get
mutt
esd (stupid sound...)
tar
gunzip
bunzip2
su
uptime
cat
mkdir

(so that was 25...sue me :))

EyesWideOpen
07-17-2001, 04:51 PM
Here are 16 of my favs:

vi[m]
ls -alFb
ps -fu user | grep -i command
tar -xzvf file.tar.gz
mount -t vfat /dev/hda1 /windows
find
top
more
startx
tail -f file
grep -in file
man
perldoc
cp
mv

[ 17 July 2001: Message edited by: EyesWideOpen ]

[ 17 July 2001: Message edited by: EyesWideOpen ]

slayer17
07-17-2001, 04:56 PM
My commands are these:

ls
ps aux|grep -v root|more
ruptime
rwho
ping
traceroute
edquota -p:
anything | awk'{print $1,$2,$3}'
clear
cd
eterm &
more
and last but not least

VI

SUOrangeman
07-17-2001, 06:09 PM
In the spirit of LinuxNewbie, ...

# whyisthisthingblinkingatme
# dosomething
# help
# hello
# imbeginningtoreallydislikelinux
# linux
# windows

:p

-SUO

Strike
07-17-2001, 09:31 PM
EWO, that command wouldn't do anything ... I think you either mean

tar xvzf file.tar.gz

or

tar cvzf file.tar.gz directory/

EyesWideOpen
07-17-2001, 09:38 PM
Originally posted by Strike:
EWO, that command wouldn't do anything ... I think you either mean

tar xvzf file.tar.gz

Doh! Yep that's the one I meant. (typo)

bdl
07-17-2001, 09:41 PM
most used commands (unsorted)

ls -lh
vim
netstat -autv
w
ps ax
kill -9 &lt;procid&gt;
startx -- -nolisten tcp 2&gt;&1 &gt; ~/logs/xerrs (aliased as 'gox')
ssh
scp &lt;command&gt;
less &lt;filename&gt;

last but not least, the ever flexible tar command, with either bzip2 or gzip flags

[ 17 July 2001: Message edited by: bdl ]

nick098
07-17-2001, 10:04 PM
Originally posted by Cheeves:
<STRONG>well lately its been hformat /dev/hdc5 -- dont ask</STRONG>
I know you said dont ask(never tell me that) I had to resist: --why would your favorite command be hformat /dev/hdc5

frozen.flame
07-18-2001, 02:46 AM
_THE_ command:

rpm2tgz

If they make it, they make it for Redhat. If it's for Redhat, it'll install on Slack.

n0thing
07-18-2001, 04:16 AM
Freqently used commands:
ls
cd
rm
top
ps ax
kill
startx &&gt;~/X.log
su
ncftp
wget
less
more
make
locate
mkfs.xfs (XFS rocks)
rpm2tgz
installpkg
upgradepkg
pkgtool
removepkg
links
cat
cdparanoia
lame
chown
chmod
insmod
man
jed

cbfunky
07-18-2001, 05:00 PM
Originally posted by Strike:
<STRONG>EWO, that command wouldn't do anything ... I think you either mean

tar xvzf file.tar.gz

or

tar cvzf file.tar.gz directory/</STRONG>

Why wouldn't the other one work? I tried it and it worked fine.
Well, yours work, too, but I didn't get any errors with the first one. Or did I just do something bad to my system :eek: ?

geekchic
07-18-2001, 06:50 PM
Originally posted by twofoolish2b:
<STRONG>gawk, date, finger, wait, unzip, touch, nice, suck, strip, mount, fsck, umount, make clean, sleep. :D</STRONG>

I think I have a new .sig! Thanx!

Strike
07-18-2001, 07:01 PM
Originally posted by cbfunky:
<STRONG>Why wouldn't the other one work? I tried it and it worked fine.
Well, yours work, too, but I didn't get any errors with the first one. Or did I just do something bad to my system :eek: ?</STRONG>
No, he changed it to the correct command :)

Domin
07-19-2001, 05:54 AM
ls
cd
su
w
cp
mv
rm
ping
telnet
ftp
find

Keyser Soze
07-19-2001, 06:03 AM
"gawk, date, finger, wait, unzip, touch, nice, suck, strip, mount, fsck, umount, make clean, sleep"

I just got that, I so need a shirt that says that... ;)

optech
07-19-2001, 10:22 AM
well, i don't really have many FAVORITE commands...
there ARE however commands i use often, but i don't like them... they're mostly system commands (ls, cd .., rm -rf, mount, ifconfig)...
but i DO have some commands that are only for kicks...
such as:
cat /dev/urandom &gt; /dev/dsp (favorite)
mpg123 Fear\ Factory\ -\ Linchpin.mp3 (from the office when i know that there're like 4 people near my home computer and my stereo is up loud.. hehe... scares the piss outta them)

slapNUT
07-19-2001, 04:52 PM
kill

slapNUT
07-19-2001, 10:51 PM
You ever notice how that pesky index.dat in the \windows\cookies folder is
nearly impossible to delete.
Here's part of my .bashrc

&lt;--snip
alias wipe='rm -f'
alias go='mount'
alias flush='umount'
potty=/win/c
butt=/win/c/windows/cookies/*

export potty butt
&lt;--snip

So if I get the urge to crunch that cookie index.dat I do this:

go $potty
wipe $butt
flush $potty

Actually anytime I mount my Bill Gates partition do some dirty deed then
umount it:

go $potty
do
dirty deed
done dirt cheap
flush $potty

hehehe