Basic Unix Commands For Using The Shell Account

Having a problem with your shell account? Post here.

Basic Unix Commands For Using The Shell Account

Postby alkaios on Wed Apr 26, 2006 12:52 pm

The basic commands used in the Unix shell are:
cd (directoryname)
(Changes directories to the one named. In Unix, you change directories one level at a time.)
cd ..
(Changes back up to the previous directory)
pwd
(Prints -- displays to the screen -- the "working" or current directory)
ls
(Lists the contents of the current directory to the screen)
ls -l
(Same as above, but it lists like the DOS DIR command with more information)
mkdir
(Make a directory -- same as DOS "md")
rmdir
(Remove a directory -- same as DOS "rd")
cat
("Concatenate," or show a files contents to the screen -- same as DOS "type.")
cp
(Copy -- same as DOS "copy")
mv
(Rename [or "move"] a file -- same as DOS "ren")
rm
(Remove [or "delete"] a file -- same as DOS "del")
logout
(Terminates a Unix Shell session)
|more
(When entered at the end of a command such as "cat" or ls -l", this displays a page of text, then stops and waits for you to issue the command to go on)
sz
(In the Unix shell, "sends" to your computer -- via ZMODEM -- the file named)
sx
(In the Unix shell, "sends" to your computer -- via XMODEM -- the file named)
rz
(In the Unix shell, tells the remote computer to "receive" a file from your computer. You need to return to your own computer and tell it to "send" a specific file or group of files)
tar -xf *file*
(extracts a tar file)
kill -9 *pid*
(Kills the process with the specified pid number. You can get the pid number of a process by using the ps x command described below. This command is useful for killing your Eggdrop if you're unable to shut it down by other means.)
ps x
(Shows all current 'processes' you have running on the shell)
pico -w *file*
(Opens the specified file in the pico text editor. The -w option prevents Tcl scripts from being messed up due to line wrapping)

netstat - Displays all connections going to and from the server
ps aux - Displays all processes running on the system and their resource usage
quota - Shows how much disk space is allocated to you, and may show much you're using (if not, try du -s).
top - Displays details about system resource usage.
uptime - Displays the current uptime and server load.
vhosts - This will display a list of vhosts available for you to use (note that not all shells have this command)
The more you know
alkaios
Contributer
Contributer
 
Posts: 26
Joined: Tue Feb 14, 2006 3:05 am
Location: Bulgaria

Postby blasco on Wed Apr 26, 2006 1:19 pm

Great!!!
I just remember also pico to open the pine mail editor, very useful to change config file suche the psybnc one :D

Just type pico filename to open the editor and edit your file, then tipe ctrl+x and save your work.

Onother usefull command and utility is gcc to compile small linux utility. If they are written in C code just type gcc -o program progam.c .
blasco
Newbie
Newbie
 
Posts: 5
Joined: Sun Mar 20, 2005 2:52 pm

Postby alkaios on Thu Apr 27, 2006 12:52 pm

Here we go one very useful link for all the linux newbbies or for the users who don't like to remember all the linux commands.Whenever you need info about a certain command you can reffere to this link:
http://www.linuxdevcenter.com/linux/cmd/
The more you know
alkaios
Contributer
Contributer
 
Posts: 26
Joined: Tue Feb 14, 2006 3:05 am
Location: Bulgaria

Re: Basic Unix Commands For Using The Shell Account

Postby ravenhair on Thu Apr 27, 2006 3:04 pm

Clarifications:

cd ..
Changes to the directory above, not nesecarily the last one you were in.

|more
this is actually two commands the "|" (pipe) connects the output of the previous command to the input of the next. using less instead of more allows you to scroll backwards


you've also missed the most important unix command:
man
Manual pages for most commands on the system. this will provide all the details you need and much much more.

try man man:

man(1) Manual pager utils man(1)

NAME
man - an interface to the on-line reference manuals

SYNOPSIS
man [-c|-w|-tZ] [-H[browser]] [-T[device]] [-adhu7V] [-i|-I] [-m sys-
tem[,...]] [-L locale] [-p string] [-C file] [-M path] [-P pager] [-r
prompt] [-S list] [-e extension] [[section] page ...] ...
man -l [-7] [-tZ] [-H[browser]] [-T[device]] [-p string] [-P pager] [-r
prompt] file ...
man -k [apropos options] regexp ...
man -f [whatis options] page ...

DESCRIPTION
man is the system's manual pager. Each page argument given to man is
normally the name of a program, utility or function. The manual page
associated with each of these arguments is then found and displayed. A
section, if provided, will direct man to look only in that section of
the manual. The default action is to search in all of the available
sections, following a pre-defined order and to show only the first page
found, even if page exists in several sections.

Manual page man(1) line 1
ravenhair
Regular
Regular
 
Posts: 80
Joined: Tue Nov 08, 2005 5:51 pm

Postby Anto on Tue May 02, 2006 1:14 pm

really it has so many good things to know ...

thank you , admire you all

with love
Anto
Anto
Newbie
Newbie
 
Posts: 10
Joined: Tue May 02, 2006 1:07 pm

Re: Basic Unix Commands For Using The Shell Account

Postby De Kus on Tue May 02, 2006 1:50 pm

alkaios wrote:ls -l
(Same as above, but it lists like the DOS DIR command with more information)
you can add 'a' as parameter to see files beginning with an . (including the dir entries . and ..)

alkaios wrote:kill -9 *pid*
(Kills the process with the specified pid number. You can get the pid number of a process by using the ps x command described below. This command is useful for killing your Eggdrop if you're unable to shut it down by other means.)
you should only use -9 (kill -s KILL) on frozen processes. Any normal application which you simply have no console control of, you should use kill -s TERM (ex. kill -s TERM 1456) or kill -15 to send the terminate signal (task manager in windows sends TERM to application, if they dont respond it asks you to send KILL Very Happy)

alkaios wrote:netstat - Displays all connections going to and from the server
I recommned using -n parameter to not resolve DNS which usually takes very long on shells with many connections.
Image
User avatar
De Kus
Phoenix Veteran
Phoenix Veteran
 
Posts: 305
Joined: Mon Mar 14, 2005 2:15 pm
Location: Germany

Postby alkaios on Tue May 02, 2006 11:11 pm

nice preview De Kus Cool
The more you know
alkaios
Contributer
Contributer
 
Posts: 26
Joined: Tue Feb 14, 2006 3:05 am
Location: Bulgaria

Postby al_tyranny on Wed May 03, 2006 3:35 am

Original post: http://www.geocities.com/TheTropics/1945/index14.htm
and http://www.egghelp.org/shell_using.htm.

Same warning as for "monster": STOP PLAGIARIZING!
mm_freak wrote:Slackware users are dreamers. Sorry to say.
al_tyranny
Phoenix Veteran
Phoenix Veteran
 
Posts: 294
Joined: Tue May 17, 2005 3:18 am
Location: Greater Boston Area

Postby Rommaster on Wed May 03, 2006 1:51 pm

Thanks al_tyranny for clearing that up. Cool

Topic locked.
SwiftIRC - irc.swiftirc.net - #phoenix
Phoenix-Network

(\__/)
(='.'=) This is Bunny. Copy and paste bunny into your
(" )_(" ) signature to help him gain world domination.
Rommaster
Phoenix Veteran
Phoenix Veteran
 
Posts: 960
Joined: Thu Mar 10, 2005 1:05 pm
Location: The Netherlands


Return to Technical Support

Who is online

Users browsing this forum: No registered users and 1 guest

cron