1 / 12

Using Linux Commands

Using Linux Commands. Lab 3. Checking system activity. To list running processes and monitoring system usage: a option ask to show process of all users who are associated with your current terminal

lana
Télécharger la présentation

Using Linux Commands

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Using Linux Commands Lab 3

  2. Checking system activity • To list running processes and monitoring system usage: • a option ask to show process of all users who are associated with your current terminal • u option asks that user names be shown , as well as other information such as the time process started and CPU usage. • VSZ (virtual set size)  size of image process(in kilobytes). • RSS(resident set size) size of program in memory.

  3. Checking system activity • To see and monitor all the processes running on the system : use spacebar to page through , and q to end the list

  4. Checking system activity • To stop any process by PID i.e. to kill process • To stop all process except your shell

  5. Exiting the shell • To exit the shell • To logout the system

  6. Using the Shell in LinuxCommands Syntax • Options: could be added to the commands to change their behavior(-a , -la , --help) • Argument: is an extra piece of information(ex.: a file name) • Environment variables : where the shell stores information that may be useful to the user’s shell session.(ex.: $HOME) • Meta characters: that have special meaning to the shell • (>) used to direct the output of a command to a file. • ( | ) pipe the output to another command.

  7. Getting Help with Using the Shell • Use the help command )help command ) • Use --help with the command(date --help) • Use theman command

  8. Understanding file permission • Why • Keep users from accessing other users’ private files • To protect important system files • permissions bits rwx rwx rwx Owner’s| Group | Others r = read w = write x = execute

  9. Change permission on a file For r, w, x octal value is 4,2,1 respectively owner(u) group(g) other(o) all(a)rwxrwxrwx owner(u) group(g) other(o) all(a)---------

  10. Creating files and directories • Go to your home directory. Type cd. • Make sure that you got to your home directory, type pwd • Create a new directory called test in your home directory: • Check the permissions of the directory by typing: • Suppose that you want to prevent everyone else from using or viewing the files in this directory: • Make the test directory your current directory :

  11. Moving, copying, and deleting files

  12. Moving, copying, and deleting files

More Related