Some Useful Linux Command-Line Commands (Items in Brackets [] Are Optional, Italicized Names Are Placeholders.)

Some Useful Linux Command-Line Commands (Items in Brackets [] Are Optional, Italicized Names Are Placeholders.)

Some Useful Linux Command-Line Commands (Items in brackets [] are optional, italicized names are placeholders.) Task Command Managing Directories (Folders) List the contents of the current directory ls [-al] List the contents of an arbitrary directory ls [-al] directoryName Create a new (empty) directory mkdir directoryName Remove an empty directory rmdir directoryName Remove a non-empty directory (!!) rm –r directoryName Rename a directory mv oldName newName Copy a directory cp –r directoryName copyName Print path to current directory pwd Change working directory to HOME cd Change working directory to directoryName cd directoryName Change working directory to parent cd .. Managing Files View a file in its entirety cat fileName View a file page-by-page less fileName View first 10 lines of a file head fileName View last 10 lines of a file tail fileName Remove a file rm fileName Rename a file mv oldName newName Copy a file cp fileName copyName Search file for pattern grep pattern fileName Run program in file in working directory ./fileName Managing Processes Show running processes ps Show real-time process statistics top Terminate process with id pid kill -9 pid Terminate process with name name pkill name Terminate all processes beginning with name killall name Pipe output of process1 to input of process2 process1 | process2 Miscellaneous Change your password yppasswd Launch Eclipse (in the background) eclipse & Show environment variables env Show value of a specific environment variable echo $variableName Login to a remote host ssh username@remoteHostName Stop current command cntrl-c Suspend current command cntrl-z Run suspended command in background bg Repeat last command é Begin terminal-recording session script [recordingFilename] Quit terminal-recording session cntrl-d CS 112, Introduction to Data Structures Dept of Computer Science Joel Adams Calvin College .

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    1 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us