Linux Tips For New Users
The command line
The command line (also referred to as the "terminal" or "console") is an alternate way to get things done, in Linux. In some casses, a succinct command at a terminal can be a lot easier and faster than doing the same task in a graphical user interface (GUI). The major downside to a command line interface is that it's pretty much useless unless you already know at least some simple commands.
In most of the distributions of Linux-based operating systems we installed at Free Your Machine (Redhat and Mandrake), pretty much everything that you would need to do can be done with an easy-to-use graphical interface. But since most people are fairly familiar with that paradigm, here are some tips on using the command line, and expanding the power you have over your computer.
Note: when at the command line in linux, you may type tab to autocomplete lines, or get a listing of files in the current directory beginning with the characters you have typed
|
| Command | Description |
| startx | start x windows |
| shutdown -r now | restart |
| shutdown -h now | shutdown w/o restart |
| su | login to root |
| exit | exit root/end terminal |
| man | view manual entry for specfied command |
| man -k keyword | search manual listingsfor keyword |
| mv filename newfilename | rename filename to newfilename |
| mv filename newdirectory | move filename to newdirectory |
| ls | lists files in directory |
| ls -al | filelisting with details |
| rm filename | deletes file |
| rm -rf foldername | delete folder and all subfile |
| cp oldfile newfile | makes copy with name newfile |
| cp oldfile directory | makes copy of file in indicated directory |
| cd directory | change to specified directory |
| cd .. | move one directory up |
| tar -xvf file.tar | unzip tar file |
| tar -t file.tar | list contents of tar file |
| tar -xvfz file.tar.gz | unzip tar.gz file |
| tar -xvfj file.tar.bz2 | unzip tar.bz2 file |
| gunzip file.gz | unzip gzip file |
| unzip file.zip | unzip zip file |
| bunzip2 file.bz2 | unzip bzip2 file |
|
| DOS Command | UNIX Command | Description |
| cd | cd | change (to) directory |
| attrib | chmod | change file protections |
| comp | diff | compare files |
| copy | cp | copy file(s) |
| del | rm | delete file |
| rd | rmdir | delete directory |
| dir | ls | list directory contents |
| edit | pico | edit a file |
| find | grep | find text in a file |
| help | man | get information on a command |
| md | mkdir | make a new directory |
| move | mv | move file(s) |
| ren | mv | rename file |
| date, time | date | show date and time |
| chkdsk | df | show free disk space (storage) |
| type | cat | show file contents |
| type | more | cat | more | show file, screen-by-screen |
| sort | sort | sort data
|
|
No comments:
Post a Comment