Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Command Line 101

  1. #1
    igodit Guest

    Default 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&quot 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.

  2. #2
    Join Date
    Jun 2003
    Posts
    160
    Rep Power
    0

    Default Re:Command Line 101

    Thanks IGodIt. I keep forgetting some of the commands.

  3. #3
    Join Date
    Nov 2003
    Posts
    185
    Rep Power
    0

    Default 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.......

  4. #4
    igodit Guest

    Default 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

  5. #5
    Join Date
    Aug 2003
    Posts
    98
    Rep Power
    0

    Default 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

  6. #6
    Join Date
    Jul 2003
    Posts
    424
    Rep Power
    0

    Default 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.

  7. #7
    Join Date
    Jul 2003
    Posts
    424
    Rep Power
    0

    Default 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.

  8. #8
    Join Date
    Jul 2002
    Posts
    5,446
    Rep Power
    10

    Default Re:Command Line 101

    what's the command to download a file?

  9. #9
    Join Date
    Aug 2002
    Posts
    1,236
    Rep Power
    0

    Default 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

  10. #10
    Join Date
    Jul 2002
    Posts
    5,446
    Rep Power
    10

    Default 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
  •