Presentation is loading. Please wait.

Presentation is loading. Please wait.

UNIX Basics Matt Hayward October 18, 2016 LS560 – Information Technology for information professionals.

Similar presentations


Presentation on theme: "UNIX Basics Matt Hayward October 18, 2016 LS560 – Information Technology for information professionals."— Presentation transcript:

1 UNIX Basics Matt Hayward October 18, 2016 LS560 – Information Technology for information professionals

2 Why Unix? Understanding the Unix command line is important for information professionals because they may be required to perform tasks from a Unix command line mastering these commands empowers them and helps with understanding information architecture Unix allows system functions not available in GUI interface, including certain interaction with other users and other administrator operations simplifies some functions like text search, comparing files, and modifying permissions

3 Login Command – ssh username@server.com enter password at prompt Action – Logs user into server Use – Gain access to Secure Shell (SSH)

4 List Files Command – ls Action – Lists files contained within present directory Use – Allows users to view what files exist within a folder

5 Change Directory Command – cd directoryname Action – Moves user to given directory Use – Allows users to navigate between folders

6 Directory Up Command – cd.. Action – Moves user up one directory level Use – Allows users to navigate to parent folders

7 Specific Directory Command – cd directory1/directory1a Action – Moves user to specific directory Use – Allows users to jump to a specific folder without navigating back to home/root folder

8 Create Directory Command – mkdir newdirectoryname Action – Creates a new directory for files Use – Allows users to add folders, create more than one at a time by placing a space between names

9 Long List Files Command – ls -l Action – Long list files Use – Displays files within present folder in long format including permissions, owner, & date of last modification

10 Command History Command – history Action – Shows command history Use – Allows users to see previously entered commands to check for errors or repeat commands

11 Show Date & Time Command – date Action – Displays current time & date Use – Allows users to view current system time and date

12 Show Calendar Command – cal Action – Displays calendar for current month Use – Allows users a quick glance at the current month’s calendar

13 View User Directory Command – who Action – Shows active users Use – Allows users to see what others users are currently logged in

14 Remove Directory Command – rmdir directoryname Action – Removes given directory Use – Allows users to delete folders

15 Create/Edit File Command – emacs documentname Action – Brings up emacs file editor Use – Can be used to create or edit text or html files within UNIX. *Note* If filename does not exist, emacs will create the filename

16 Save File Command – ctrl+x then ctrl+c Action – Exits emacs file editor Use – Allows users to exit emacs, after being prompted to save changes

17 Search Command – grep searchstring filename Action – Searches files for text Use – Allows users to search for specific text within a larger document

18 Display Files Command – more filename Action – Displays file contents Use – Allows users to view the contents of a file within SSH *Note* files too large for one screen are paused after each screen and advanced by the user

19 Copy File Command – cp originalfile copyfile Action – Duplicates file Use – Allows users to quickly duplicate a file using a specified new name

20 Rename File Command – mv originalname newname Action – Renames indicated file Use – Allows users to quickly rename files within a folder

21 Show Differences Command – diff Filename1 Filename2 Action – Shows differences between two files Use – Allows users to quickly see what differences exist between two files

22 Delete File Command – rm filename Action – Removes files Use – Allows users to delete files

23 Show Location Command – pwd Action – Displays present directory Use – Allows user to quickly see which folder they’re currently in

24 Show User Info Command – finger username Action – Displays user info Use – Allows users to quickly find information about other users including name, home directory path, most recent login, last mail check, and.plan files (typically used for contact info)

25 Show Last Login Command – last -1 username Action – Display another users most recent login Use – Allows users to see when others were most recently active in the shell

26 Show Username Command – whoami Action – Displays current user information Use – Can be useful if multiple users access a machine and there is question as to which user is currently logged in on the machine

27 Change Password Command – passwd Action – Displays password change prompt Use – Allows users to change their shell password, current password is required

28 Permissions characterxrwxrwxrwx meaningfile typereadwriteexecutereadwriteexecutereadwriteexecute user typeu - Ownerg - Group (network users)o - Other (public) drwxr-x--- OwnerGroupOthers directorycan read can write can execute can read cannot write can execute cannot read cannot write cannot execute Standard symbolic notation for file permissions Example Setting permissions allows site owners to decide which users can read, write, and/or execute files/directories

29 Permissions - Modifying Command – chmod o+w filename Action – Change file permission for others (o) to allow (+) write (w) Use – Allows users to add or remove file permissions for other users and groups *Note* 1 st character = user class (u/g/o) 2 nd character = allow/deny (+/-) 3 rd character = permission (r/w/x)

30 Logout Command – exit Action – Logs out of shell Use – Allows users to properly log out of shell before exiting


Download ppt "UNIX Basics Matt Hayward October 18, 2016 LS560 – Information Technology for information professionals."

Similar presentations


Ads by Google