Presentation is loading. Please wait.

Presentation is loading. Please wait.

UNIX/LINUX Commands Using BASH Copyright © 2017 – Curt Hill.

Similar presentations


Presentation on theme: "UNIX/LINUX Commands Using BASH Copyright © 2017 – Curt Hill."— Presentation transcript:

1 UNIX/LINUX Commands Using BASH Copyright © 2017 – Curt Hill

2 Introduction Unlike in DOS there is nothing like internal commands
Rather, every command is an executable Executables are not indicated by an extension either Most commands are in a portion of file system owned by the OS You may also create your own programs which are not commands The concept of the path originated in UNIX so commands may be in your space Copyright © 2017 – Curt Hill

3 General UNIX and LINUX are case sensitive
Files and commands must be in the correct case Most commands are usually all lower case Copyright © 2017 – Curt Hill

4 Accessing the System Unless you want to use a dual boot or Virtual machine type of approach, we will usually connect to a machine through the network We need a client program that will do the connection and allow us to login and send commands We will use the Windows PuTTY The TTY is the TeleTYpe abbreviation This is a window with a console in it Copyright © 2017 – Curt Hill

5 PuTTY Copyright © 2017 – Curt Hill

6 Notes We put in an IP or machine name in the host name
Specifying SSH gets the right port Secure Shell We then click Open to get to the login screen Our server will want a login name and password We then typically get the following screen Copyright © 2017 – Curt Hill

7 The Login Screen Copyright © 2017 – Curt Hill

8 Notes The login name is visible Reproduced for the password
The password is blackened when type so not visible Most of the screen shots are from a Raspberry PI It uses Raspberrian a Debian Linux derivation However, the next is from Ubuntu Copyright © 2017 – Curt Hill

9 Initial Logged in Screen
Copyright © 2017 – Curt Hill

10 File Commands Now that we can login it is time to look at the normal file commands We need to be able show the contents of directory, move, copy, delete and the like However, first we have to consider options Copyright © 2017 – Curt Hill

11 Command Line Options Almost every command has a plethora of options
This presentation will cover only a few for each command These are preceded by a dash MS uses the forward slash Options generally come first after the command name Copyright © 2017 – Curt Hill

12 File Specification Wild Cards
The usual: * is zero or more characters UNIX does not believe in name+extension The * can cover a . as well ? Any one character [ ] Any characters in the brackets Regular expression set Copyright © 2017 – Curt Hill

13 LS This shows the contents of the directory
You may specify a file or file specification There are a variety of options l gives the long listing Copyright © 2017 – Curt Hill

14 Picture Copyright © 2017 – Curt Hill

15 Notes The prompt is showing the directory
The default behavior is to sort the results The long option shows the directories and permissions Owner Group World Read Write eXecute Copyright © 2017 – Curt Hill

16 CP Short for copy cp src dest
May do simple files or entire directories Two options to mention n do not overwrite like named files r recursively copy subdirectories Copyright © 2017 – Curt Hill

17 CAT Short for concatenate cat file
Typical way to copy things to the console Multiple files may be specfied Copyright © 2017 – Curt Hill

18 Picture Copyright © 2017 – Curt Hill

19 MV Move mv src dest mv is like cp but deletes the original
This is the usual way to rename a file as well Copyright © 2017 – Curt Hill

20 RM Remove is delete It will delete files Use rmdir for directorie
However, -r will recursively remove directories and files Easy for this to get out of hand The i option prompts for each deletion Copyright © 2017 – Curt Hill

21 CD or CHDIR The change directory command
cd is short for chdir The abbreviation is much newer than original Very similar to the DOS command There is no man for cd but chdir Copyright © 2017 – Curt Hill

22 MKDIR Create a new directory No abbreviation for this one
Copyright © 2017 – Curt Hill

23 RMDIR Removes a directory Directory must be empty
This may include multiple directories Copyright © 2017 – Curt Hill

24 MAN Short for manual – this is the help of UNIX Format is: man cmd
Whenever you don’t know use the man page to find the parameters Copyright © 2017 – Curt Hill

25 MAN MAN Copyright © 2017 – Curt Hill

26 Exiting The logout command exits the system
The exit command will also do it Copyright © 2017 – Curt Hill

27 Conclusion This is not the conclusion – we have more to do
This should give the ability to manipulate the files of our directories We will need a demo and then more commands of other types Copyright © 2017 – Curt Hill


Download ppt "UNIX/LINUX Commands Using BASH Copyright © 2017 – Curt Hill."

Similar presentations


Ads by Google