Changes

Jump to: navigation, search

This Is Your Brain On Informatics: Linux Commands

1,900 bytes added, 00:57, 27 March 2014
no edit summary
===General Linux Command Info===
 
<p>
*Almost every single command should have an argument (an input for a function)
*A filename in Linux refers to both a file's name and a directory's name
</p>
===Common Linux Commands===
 
{| class="wikitable"
|-
! style="padding: 10px;"| Command
! style="padding: 10px;"| Syntax
! style="padding: 10px;"| Description
|-
! Command| style="padding: 10px;"| cat! Syntax| style="padding: 10px;"| cat ''filename''! Description| style="padding: 10px;"| Display file’s contents to the standard output device (usually your monitor)
|-
| catstyle="padding: 10px;"| cd| cat style="padding: 10px;"| cd ''filename/pathname''| Display file’s contents style="padding: 10px;"| Change to the standard output device (usually your monitor)given directory
|-
| cdstyle="padding: 10px;"| chmod*| cd style="padding: 10px;"| chmod ''options'' ''mode'' ''/pathnamefilename''| Change to the given directorystyle="padding: 10px;"| Changes a file's permissions.
|-
| chmod*style="padding: 10px;"| chown| chmod ''options'' style="padding: 10px;"| chown ''modeprivate_owner:group_owner'' ''filename''| style="padding: 10px;"| Changes a ownership of the file's permissions.
|-
| chownstyle="padding: 10px;"| clear| chown ''private_ownerstyle="padding:group_owner'' ''filename''10px;"| clear| Changes ownership of style="padding: 10px;"| Clears the filescreen by scrolling (does not delete anything)
|-
| clearstyle="padding: 10px;"| cp| clearstyle="padding: 10px;"| cp ''options'' ''source'' ''destination''| Clears style="padding: 10px;"| Copies a file from the source to the screen by scrolling (does not delete anything)destination
|-
| cpstyle="padding: 10px;"| find| cp style="padding: 10px;"| find ''options/pathname'' ''source'' ''destinationstring''| Copies a file from style="padding: 10px;"| Starts at the source to indicated directory and searches for the destinationstring in a filename
|-
| findstyle="padding: 10px;"| grep| find style="padding: 10px;"| grep ''options''/pathname'' pattern''string''filename''| Starts at the indicated directory and searches style="padding: 10px;"| Searches for the string pattern in a filenamethe file
|-
| grepstyle="padding: 10px;"| ifconfig| grep ''options'' ''pattern'' ''filename''style="padding: 10px;"| ifconfig| Searches for the pattern in style="padding: 10px;"| Displays the filecurrent networks available and various information about them
|-
| ifconfigstyle="padding: 10px;"| ll| ifconfigstyle="padding: 10px;"| ll ''/pathname''| Displays style="padding: 10px;"| List Long: lists the details of the current networks available and various information about thementire directory or file indicated
|-
| llstyle="padding: 10px;"| ln| ll style="padding: 10px;"| ln ''options'' ''source'''/pathname'destination''| List Longstyle="padding: 10px;"| Link: creates a shortcut. lists Use -s for the details of the entire directory or file indicated''options'' to create a soft link (more capabilities)
|-
| lnstyle="padding: 10px;"| ls| ln ''options'' ''sourcestyle="padding: 10px;"| ls '' ''destination/pathname''| Linkstyle="padding: creates a shortcut. Use -s for 10px;"| Lists the ''options'' to create files and directories in a soft link (more capabilities)given directory
|-
| lsstyle="padding: 10px;"| man| ls style="padding: 10px;"| man ''/pathnamecommand''| Lists style="padding: 10px;"| Opens the manual page for the files and directories in a given directorycommand
|-
| manstyle="padding: 10px;"| mkdir| man style="padding: 10px;"| mkdir ''options'' ''commandfilename''| Opens style="padding: 10px;"| Makes a directory at the manual page for given location with the given commandname
|-
| mkdirstyle="padding: 10px;"| mv| mkdir style="padding: 10px;"| mv ''options'' ''filenamesource'' ''destination''| Makes style="padding: 10px;"| Moves a file or directory at from the given location with source to the given namedestination
|-
| mvstyle="padding: 10px;"| [[This Is Your Brain On Informatics: Pico|pico]]| mv ''options'' ''source'style="padding: 10px;"| pico ' ''destinationfilename''| Moves a style="padding: 10px;"| Opens the given file or directory from the source to in the destinationpico text editor
|-
| [[This Is Your Brain On Informaticsstyle="padding: Pico10px;"|pico]]pwd| pico ''filename''style="padding: 10px;"| pwd| Opens style="padding: 10px;"| Displays the given file in pathname for the pico text editorcurrent directory
|-
| pwdstyle="padding: 10px;"| rm| pwdstyle="padding: 10px;"| rm ''options'' ''filename''| Displays style="padding: 10px;"| Removes the pathname given file. If -rf is used for the current options, a directoryand its roots will be removed as well
|-
| rmstyle="padding: 10px;"| ssh| rm style="padding: 10px;"| ssh ''options'' ''filenameuser@machine''| Removes style="padding: 10px;"| Remotely logs into the given file. If -rf is used for machine with the options, a directory and its roots will be removed as wellgiven user name
|-
| sshstyle="padding: 10px;"| sudo| ssh ''options'' style="padding: 10px;"| sudo ''user@machinecommand''| Remotely logs into the given machine with style="padding: 10px;"| Allows super user privileges for the given user namecommand (requires root password). sudo su allows login to root
|-
| sudostyle="padding: 10px;"| tar| sudo style="padding: 10px;"| tar -xzvf ''commandfilename''| Allows super user privileges for style="padding: 10px;"| Extracts files with the given command (requires root password)extension *.tar.gz or *. sudo su allows login to roottgz
|-
| tarstyle="padding: 10px;"| touch| tar -xzvfstyle="padding: 10px;"| touch ''filename''| Extracts files style="padding: 10px;"| Creates an empty file with the extension *.tar.gz or *.tgzgiven name
|-
| touchstyle="padding: 10px;"| wget| touch style="padding: 10px;"| wget ''filenameinternet address''| Creates an empty style="padding: 10px;"| Downloads a file with from a given nameinternet address
|-
===*Notes on chmod===
'''chmod''' has several input options. Using a "+" and an "r", "w", and/or "x" will add read, write, or execute permissions respectively to the given file. A "-" will take these away. The other system is a binary system in which there are permissions for the private user, the group, and the public (other) given as 000 000 000 where each set of three 0's equals the private user, group, or public respectively. The first 0 in each set of 0's is for reading permission, the second for writing, and the third for executing. Because it is binary 100 000 000 (permission for the private user to read only) will be written as 400 in the command line (after translating the binary to decimal where 100 = 4)
<p>
'''chmod''' has several input options. Using a + and an r, w, and/or x will add read, write, or execute permissions respectively to the given file. A - will take these away. The other system is a binary system in which there are permissions for the private user, the group, and the public given as 000 000 000 where each set of three 0's equals the group respectively. The first 0 in each group for reading permission, the second for writing, and the third for executing. Because it is binary 100 000 000 (permission for the private user to only read) will be written as 400 in the command line (after translating the binary to decimal where 100 = 4)
</p>
<br />{{This Is Your Brain On Informatics}}
{{[[Category:This Is Your Brain On Informatics}}]]
347
edits

Navigation menu