-
Nov 11, 2003, 02:15 PM
#1
Command Line 101
<insert programname here> - Launches a common program.
./<insert filename here> - Launches a program that is in your current directory, and cannot be launched by just typing it's name. This often happens when you download a program and install it to your home directory.
cal - Displays a text-based calendar.
cat <insert filename here> - Displays the contents of a file.
cd <insert directory here> - This "changes" the "directory" you are in.
cd - Takes you to your home directory.
chmod - Change file permissions.
cp <insert filename here> <insert directory here> - This command copies the file from the current directory to the destination directory. You can also specify the folder the file is in like in "ls", if you do not wish to cd to the directory to copy the file.
halt - Shutdown system.
import <insert filename here> - Puts a screenshot of the current selected window or desktop in your home directory.
init <insert runlevel here> - Changes the runlevel of the computer when run as "root", allowing configuration such as changing video drivers for your X server when in runlevel 1 or 3.
kill <insert process number here> - Kills the process (the process number is found in "ps -ef" if you don't want it to run or feel that it's hostile.
ls <insert directory here> - This will show you all the things in the specified directory without having to cd to the directory.
ls - This will show you all the things in your current directory. You can also use "ls -all" to see the hidden files. Another useful tag for "ls" is "ls | less" - The "|" (which you can get by doing shift+\) pipes the output through "less", which breaks the output into pages which can be flipped through with the spacebar.
man <insert commandname here> - Displays the manual about the specified command.
mkdir <insert directoryname here> - Makes a directory.
mv <insert filename here> <insert directory here> - Moves a file. You can also enter a different name for the file after the destination directory, and "mv" will rename your file as it moves it.
ps -ef - Tells you what services are running. "ps -ef | grep <insert programname or servicename here>" will search through the running services and display only those services that match the word you entered after grep.
pwd - Will tell you what directory you are in.
reboot – Restart system.
rm <insert filename here> - Removes a file.
rmdir - Removes an empty directory. You can use "rmdir -rf" to remove a directory and the directories/files within it.
su - Logs you in as "root", the administrator of the computer. You have to enter the root password after entering "su". You can also type "su -" to to use root's PATH variables. (Useful if you cannot run a program as root, even though you think you should be able to. Such as the "init" command.)
uptime - Tells you your computers' uptime.
whereis <insert filename here> - Tells you the directory the specified file is in.
w - Tells you who is logged into your machine and what they are doing.
-
Nov 11, 2003, 02:20 PM
#2
Re:Command Line 101
Thanks IGodIt. I keep forgetting some of the commands.
-
Nov 12, 2003, 06:29 PM
#3
Re:Command Line 101
Thank IGODIT.....beein a fairly new Linux User myself...I did know some of those commands. Keep it up..and I implore any persons here to add useful linux commands they know.......
-
Nov 12, 2003, 06:47 PM
#4
Re:Command Line 101
RPM Command lines
Install an RPM file
#rpm -i rpm-package-name.rpm
Install an RPM and view the process
#rpm -ivh rpm-package-name.rpm
Upgrade an exisiting RPM file
#rpm -Uvh rpm-package-name.rpm
TAR Command line
Uncompress a TAR (.tar) file that has a GZip (.gz)
tar -zvxf my-tar-file.tar.gz
-
Nov 13, 2003, 11:36 AM
#5
Re:Command Line 101
Excellent quick tutorial -- I am sure that this is the first in a series of quick guides for people new to linux., that might include things like "why are there so many three-letter directories, and what do they do?" and shell scripting for fun and laziness, and apt-get tricks
-
Nov 17, 2003, 11:41 AM
#6
Re:Command Line 101
Here is a list, that help me:
http://www.hansenmedia.com/unixcode.htm
The apropos is really neat, I use to beg for a way to find a command by knowing what I want it to do. Really cool.
-
Nov 18, 2003, 08:38 AM
#7
Re:Command Line 101
Check out the sudo command as well. It allows the administrator to give regular users or groups the ability to run specified admin commands, without them knowing the root password and hence have full root privileges.
-
Nov 21, 2003, 09:53 PM
#8
Re:Command Line 101
what's the command to download a file?
-
Nov 21, 2003, 10:09 PM
#9
Re:Command Line 101
wget <url>
usually works
eg. wget http://www.nice-open-source-stuff.com/file.tgz
will download a file called file.tgz from a server called www.nice-open-source-stuff.com
-
Nov 21, 2003, 10:14 PM
#10
Re:Command Line 101
Thanks pigeonflight I'm already familiar with wget. I think that I didn't explain myself properly. I want to use a line command to copy a file from a remote linux box to my local PC.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules