Cs320 web and internet programming linux basics
This presentation is the property of its rightful owner.
Sponsored Links
1 / 11

CS320 Web and Internet Programming Linux Basics PowerPoint PPT Presentation


  • 149 Views
  • Uploaded on
  • Presentation posted in: General

CS320 Web and Internet Programming Linux Basics. Chengyu Sun California State University, Los Angeles. Directory Structure. root directory / current directory . Parent directory .. home directory ~. Moving Around. cd / absolute / path cd relative / path cd.

Download Presentation

CS320 Web and Internet Programming Linux Basics

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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Cs320 web and internet programming linux basics

CS320 Web and Internet ProgrammingLinux Basics

Chengyu Sun

California State University, Los Angeles


Directory structure

Directory Structure

  • root directory /

  • current directory .

  • Parent directory ..

  • home directory ~


Moving around

Moving Around

  • cd/absolute/path

  • cd relative/path

  • cd


Directory and file commands

Directory and File Commands

  • Find current directory: pwd

  • List directory content: ls

    • list all files -a

    • list files in long format –l

  • Copy files

    • cp file1 file2

    • cp file1 file2 dir

  • Move/rename file

    • mv file1 file2

    • mv file1 file2 dir


Some useful commands

Some Useful Commands

  • Reference the manual pages

    • man <command>

  • Create command aliases

    • alias dir=“ls –lX”


Choices of editors

Console

vi, vim

emacs

pico

With X Forwarding

gvim

xemacs

gedit

IDEs

Netbeans

Eclipse

KDevelop

Choices of Editors


Environment variables

Environment Variables

  • Set an environment variable X

    • export X=“something”

  • Show an environment variable X

    • echo$X

  • Common environment variables

    • $HOME, $PATH

    • $JAVA_HOME


File permissions

File Permissions

  • Three categories of users:

    • owner, group, other

  • Three privileges

    • read, write, execute


File permission example

File Permission Example

-rw------- 1 cs320stu31 cs320stu31 116 Sep 24 14:53 .mysql_history

drwx------ 2 cs320stu31 cs320stu31 4096 Sep 24 14:43 .ssh

-rw------- 1 cs320stu31 cs320stu31 790 Sep 24 14:52 .viminfo

-rw------- 1 cs320stu31 cs320stu31 63 Sep 28 10:09 .Xauthority

drwxr-xr-x 2 cs320stu31 cs320stu31 4096 Sep 24 14:32 .xemacs


Change file permissions

Change File Permissions

  • chmod


Bashrc

.bashrc

  • Executed every time you log into your account

  • A good place to put some commands that help you set up your environment


  • Login