![Page 1: About the Presenter Getting Started Directory Navigation ...Directory Navigation Permissions Other Important Commands and Applications Questions About LUG/ACM Using the Shell UIC Linux](https://reader034.vdocuments.mx/reader034/viewer/2022042108/5e87c0ec8cb7df19f85432ff/html5/thumbnails/1.jpg)
About the PresenterGetting Started
Directory NavigationPermissions
Other Important Commands and ApplicationsQuestions
About LUG/ACM
Using the Shell
UIC Linux Users Group
September 9, 2010
UIC Linux Users Group Using the Shell
![Page 2: About the Presenter Getting Started Directory Navigation ...Directory Navigation Permissions Other Important Commands and Applications Questions About LUG/ACM Using the Shell UIC Linux](https://reader034.vdocuments.mx/reader034/viewer/2022042108/5e87c0ec8cb7df19f85432ff/html5/thumbnails/2.jpg)
About the PresenterGetting Started
Directory NavigationPermissions
Other Important Commands and ApplicationsQuestions
About LUG/ACM
Hold Your Comments
About the Presenter
I Alias: eviljoel (or ej)I Name: Joel LuellwitzI 7 Years of Linux Experience.I UIC Alumni
I Management Information Systems Masters from the CBA.I Works at Peapod.com.
UIC Linux Users Group Using the Shell
![Page 3: About the Presenter Getting Started Directory Navigation ...Directory Navigation Permissions Other Important Commands and Applications Questions About LUG/ACM Using the Shell UIC Linux](https://reader034.vdocuments.mx/reader034/viewer/2022042108/5e87c0ec8cb7df19f85432ff/html5/thumbnails/3.jpg)
About the PresenterGetting Started
Directory NavigationPermissions
Other Important Commands and ApplicationsQuestions
About LUG/ACM
Hold Your Comments
Please hold your comments and contributions!I Questions are OK if you are confused or behind.I May have time for questions at the end.
UIC Linux Users Group Using the Shell
![Page 4: About the Presenter Getting Started Directory Navigation ...Directory Navigation Permissions Other Important Commands and Applications Questions About LUG/ACM Using the Shell UIC Linux](https://reader034.vdocuments.mx/reader034/viewer/2022042108/5e87c0ec8cb7df19f85432ff/html5/thumbnails/4.jpg)
About the PresenterGetting Started
Directory NavigationPermissions
Other Important Commands and ApplicationsQuestions
About LUG/ACM
Open a ShellA Shell, what is it?
This is an interactive presentation.I Login
I Ask if you need help.I Click on Applications⇒Accessories⇒TerminalI Type ’bash’ (Enter) for a real shell.
UIC Linux Users Group Using the Shell
![Page 5: About the Presenter Getting Started Directory Navigation ...Directory Navigation Permissions Other Important Commands and Applications Questions About LUG/ACM Using the Shell UIC Linux](https://reader034.vdocuments.mx/reader034/viewer/2022042108/5e87c0ec8cb7df19f85432ff/html5/thumbnails/5.jpg)
About the PresenterGetting Started
Directory NavigationPermissions
Other Important Commands and ApplicationsQuestions
About LUG/ACM
Open a ShellA Shell, what is it?
A Shell, what is it?
I It interprets commands from the user.I Passes control to other programs.I Supports batch operations via scripting.I bash is one of many shells.
I sh, csh, tcsh, zsh, etc.
UIC Linux Users Group Using the Shell
![Page 6: About the Presenter Getting Started Directory Navigation ...Directory Navigation Permissions Other Important Commands and Applications Questions About LUG/ACM Using the Shell UIC Linux](https://reader034.vdocuments.mx/reader034/viewer/2022042108/5e87c0ec8cb7df19f85432ff/html5/thumbnails/6.jpg)
About the PresenterGetting Started
Directory NavigationPermissions
Other Important Commands and ApplicationsQuestions
About LUG/ACM
List (ls)bash TipsDirectory CommandsChange Directory (cd)Mount PointsMoving, Copying and Deleting
List (ls)
Lists files and directories.I Directories are equivalent to folders.
I lsI ls -lI ls -aI ls -la
UIC Linux Users Group Using the Shell
![Page 7: About the Presenter Getting Started Directory Navigation ...Directory Navigation Permissions Other Important Commands and Applications Questions About LUG/ACM Using the Shell UIC Linux](https://reader034.vdocuments.mx/reader034/viewer/2022042108/5e87c0ec8cb7df19f85432ff/html5/thumbnails/7.jpg)
About the PresenterGetting Started
Directory NavigationPermissions
Other Important Commands and ApplicationsQuestions
About LUG/ACM
List (ls)bash TipsDirectory CommandsChange Directory (cd)Mount PointsMoving, Copying and Deleting
List (ls) (continued)
I Wildcards (* and ?)I more
I ls -l | more
UIC Linux Users Group Using the Shell
![Page 8: About the Presenter Getting Started Directory Navigation ...Directory Navigation Permissions Other Important Commands and Applications Questions About LUG/ACM Using the Shell UIC Linux](https://reader034.vdocuments.mx/reader034/viewer/2022042108/5e87c0ec8cb7df19f85432ff/html5/thumbnails/8.jpg)
About the PresenterGetting Started
Directory NavigationPermissions
Other Important Commands and ApplicationsQuestions
About LUG/ACM
List (ls)bash TipsDirectory CommandsChange Directory (cd)Mount PointsMoving, Copying and Deleting
Random bash Tips
I Tab CompletionI Command History
UIC Linux Users Group Using the Shell
![Page 9: About the Presenter Getting Started Directory Navigation ...Directory Navigation Permissions Other Important Commands and Applications Questions About LUG/ACM Using the Shell UIC Linux](https://reader034.vdocuments.mx/reader034/viewer/2022042108/5e87c0ec8cb7df19f85432ff/html5/thumbnails/9.jpg)
About the PresenterGetting Started
Directory NavigationPermissions
Other Important Commands and ApplicationsQuestions
About LUG/ACM
List (ls)bash TipsDirectory CommandsChange Directory (cd)Mount PointsMoving, Copying and Deleting
Directory Commands
I pwdI mkdir <directory>I rmdir <directory>
UIC Linux Users Group Using the Shell
![Page 10: About the Presenter Getting Started Directory Navigation ...Directory Navigation Permissions Other Important Commands and Applications Questions About LUG/ACM Using the Shell UIC Linux](https://reader034.vdocuments.mx/reader034/viewer/2022042108/5e87c0ec8cb7df19f85432ff/html5/thumbnails/10.jpg)
About the PresenterGetting Started
Directory NavigationPermissions
Other Important Commands and ApplicationsQuestions
About LUG/ACM
List (ls)bash TipsDirectory CommandsChange Directory (cd)Mount PointsMoving, Copying and Deleting
Change Directory (cd)
Changes the current working directory.I cd <directory>I cd /
I All locations start here.I No drives like on Windows or DOS.
I cd ∼ (or just cd)I Taks you to /home/<your username>
UIC Linux Users Group Using the Shell
![Page 11: About the Presenter Getting Started Directory Navigation ...Directory Navigation Permissions Other Important Commands and Applications Questions About LUG/ACM Using the Shell UIC Linux](https://reader034.vdocuments.mx/reader034/viewer/2022042108/5e87c0ec8cb7df19f85432ff/html5/thumbnails/11.jpg)
About the PresenterGetting Started
Directory NavigationPermissions
Other Important Commands and ApplicationsQuestions
About LUG/ACM
List (ls)bash TipsDirectory CommandsChange Directory (cd)Mount PointsMoving, Copying and Deleting
Change Directory (cd) - Relative Navigation
I cd ./I cd ../I cd ../../someotherplace/
UIC Linux Users Group Using the Shell
![Page 12: About the Presenter Getting Started Directory Navigation ...Directory Navigation Permissions Other Important Commands and Applications Questions About LUG/ACM Using the Shell UIC Linux](https://reader034.vdocuments.mx/reader034/viewer/2022042108/5e87c0ec8cb7df19f85432ff/html5/thumbnails/12.jpg)
About the PresenterGetting Started
Directory NavigationPermissions
Other Important Commands and ApplicationsQuestions
About LUG/ACM
List (ls)bash TipsDirectory CommandsChange Directory (cd)Mount PointsMoving, Copying and Deleting
Mount Points
All physical volumes are part of the same hierarchy.I Mount points are found under /mnt and /media.I mount <device> <mount point>I umount <mount point>
UIC Linux Users Group Using the Shell
![Page 13: About the Presenter Getting Started Directory Navigation ...Directory Navigation Permissions Other Important Commands and Applications Questions About LUG/ACM Using the Shell UIC Linux](https://reader034.vdocuments.mx/reader034/viewer/2022042108/5e87c0ec8cb7df19f85432ff/html5/thumbnails/13.jpg)
About the PresenterGetting Started
Directory NavigationPermissions
Other Important Commands and ApplicationsQuestions
About LUG/ACM
List (ls)bash TipsDirectory CommandsChange Directory (cd)Mount PointsMoving, Copying and Deleting
Moving, Copying and Deleting
I touch <file>I Use it to create empty files.
I mv -i <source> <destination>I Rename and Move
I cp -i <source> <destination>
I rm -i <file(s)>I rm -rfI <directory(ies)>
UIC Linux Users Group Using the Shell
![Page 14: About the Presenter Getting Started Directory Navigation ...Directory Navigation Permissions Other Important Commands and Applications Questions About LUG/ACM Using the Shell UIC Linux](https://reader034.vdocuments.mx/reader034/viewer/2022042108/5e87c0ec8cb7df19f85432ff/html5/thumbnails/14.jpg)
About the PresenterGetting Started
Directory NavigationPermissions
Other Important Commands and ApplicationsQuestions
About LUG/ACM
Example Shell ScriptFile PermissionsDirectory PermissionsUser, Group, Other PermissionsComplex PermissionsSymlinks
Example Shell Script
echo \#\!/bin/sh > temp.shecho echo \”Hello world\!\\n\” >> temp.sh
UIC Linux Users Group Using the Shell
![Page 15: About the Presenter Getting Started Directory Navigation ...Directory Navigation Permissions Other Important Commands and Applications Questions About LUG/ACM Using the Shell UIC Linux](https://reader034.vdocuments.mx/reader034/viewer/2022042108/5e87c0ec8cb7df19f85432ff/html5/thumbnails/15.jpg)
About the PresenterGetting Started
Directory NavigationPermissions
Other Important Commands and ApplicationsQuestions
About LUG/ACM
Example Shell ScriptFile PermissionsDirectory PermissionsUser, Group, Other PermissionsComplex PermissionsSymlinks
Example Shell Script (continued)
I cat temp.shI echoI #!I File Redirection
UIC Linux Users Group Using the Shell
![Page 16: About the Presenter Getting Started Directory Navigation ...Directory Navigation Permissions Other Important Commands and Applications Questions About LUG/ACM Using the Shell UIC Linux](https://reader034.vdocuments.mx/reader034/viewer/2022042108/5e87c0ec8cb7df19f85432ff/html5/thumbnails/16.jpg)
About the PresenterGetting Started
Directory NavigationPermissions
Other Important Commands and ApplicationsQuestions
About LUG/ACM
Example Shell ScriptFile PermissionsDirectory PermissionsUser, Group, Other PermissionsComplex PermissionsSymlinks
File Permissions
I chmod <permission> file(s)I Read u+r (r - -)I Write u+w (-w-)I Execute u+x (- -x)
I chmod u+x temp.shI ./temp.sh
I ls -l
UIC Linux Users Group Using the Shell
![Page 17: About the Presenter Getting Started Directory Navigation ...Directory Navigation Permissions Other Important Commands and Applications Questions About LUG/ACM Using the Shell UIC Linux](https://reader034.vdocuments.mx/reader034/viewer/2022042108/5e87c0ec8cb7df19f85432ff/html5/thumbnails/17.jpg)
About the PresenterGetting Started
Directory NavigationPermissions
Other Important Commands and ApplicationsQuestions
About LUG/ACM
Example Shell ScriptFile PermissionsDirectory PermissionsUser, Group, Other PermissionsComplex PermissionsSymlinks
Directory Permissions
I chmod <permission> directory(ies)I Read u+r (r - -)I Write (-w-)I Traverse (- -x)
I ls -lI d- - - - - - - - -
UIC Linux Users Group Using the Shell
![Page 18: About the Presenter Getting Started Directory Navigation ...Directory Navigation Permissions Other Important Commands and Applications Questions About LUG/ACM Using the Shell UIC Linux](https://reader034.vdocuments.mx/reader034/viewer/2022042108/5e87c0ec8cb7df19f85432ff/html5/thumbnails/18.jpg)
About the PresenterGetting Started
Directory NavigationPermissions
Other Important Commands and ApplicationsQuestions
About LUG/ACM
Example Shell ScriptFile PermissionsDirectory PermissionsUser, Group, Other PermissionsComplex PermissionsSymlinks
User, Group, Other Permissions
I chmod u+rwx <file(s)> (- rwx-- - - - -)I chmod g+rwx <file(s)> (- - - - rwx-- -)I chmod o+rwx <file(s)> (- - - - - - - rwx)
I chmod u-rw <file(s)>I chmod a+rx <file(s)>I chmod 755 <file(s)> (- rwxr-wr-w)
UIC Linux Users Group Using the Shell
![Page 19: About the Presenter Getting Started Directory Navigation ...Directory Navigation Permissions Other Important Commands and Applications Questions About LUG/ACM Using the Shell UIC Linux](https://reader034.vdocuments.mx/reader034/viewer/2022042108/5e87c0ec8cb7df19f85432ff/html5/thumbnails/19.jpg)
About the PresenterGetting Started
Directory NavigationPermissions
Other Important Commands and ApplicationsQuestions
About LUG/ACM
Example Shell ScriptFile PermissionsDirectory PermissionsUser, Group, Other PermissionsComplex PermissionsSymlinks
User, Group, Other Permissions
I - rwsr -Sr-tI Layered directories to support complex permissions.I Access Control Lists
I Security Enhanced Linux
UIC Linux Users Group Using the Shell
![Page 20: About the Presenter Getting Started Directory Navigation ...Directory Navigation Permissions Other Important Commands and Applications Questions About LUG/ACM Using the Shell UIC Linux](https://reader034.vdocuments.mx/reader034/viewer/2022042108/5e87c0ec8cb7df19f85432ff/html5/thumbnails/20.jpg)
About the PresenterGetting Started
Directory NavigationPermissions
Other Important Commands and ApplicationsQuestions
About LUG/ACM
Example Shell ScriptFile PermissionsDirectory PermissionsUser, Group, Other PermissionsComplex PermissionsSymlinks
Symlinks
I Can be used for security.I Hard and Soft LinksI ln -s <realfile> <symlink>
I Like a Windows Shortcut.I More Transparent.
UIC Linux Users Group Using the Shell
![Page 21: About the Presenter Getting Started Directory Navigation ...Directory Navigation Permissions Other Important Commands and Applications Questions About LUG/ACM Using the Shell UIC Linux](https://reader034.vdocuments.mx/reader034/viewer/2022042108/5e87c0ec8cb7df19f85432ff/html5/thumbnails/21.jpg)
About the PresenterGetting Started
Directory NavigationPermissions
Other Important Commands and ApplicationsQuestions
About LUG/ACM
Environment VariablesText EditorsOther Commands
Environment Variables
I echo $TERMI export TERM=”xterm”I $SHELL $DISPLAY $HOSTNAME $JAVA $PATH
UIC Linux Users Group Using the Shell
![Page 22: About the Presenter Getting Started Directory Navigation ...Directory Navigation Permissions Other Important Commands and Applications Questions About LUG/ACM Using the Shell UIC Linux](https://reader034.vdocuments.mx/reader034/viewer/2022042108/5e87c0ec8cb7df19f85432ff/html5/thumbnails/22.jpg)
About the PresenterGetting Started
Directory NavigationPermissions
Other Important Commands and ApplicationsQuestions
About LUG/ACM
Environment VariablesText EditorsOther Commands
Text Editors
I Newbies use pico or nano.I Real Linux users use vim.
I Weird people use emacs.
UIC Linux Users Group Using the Shell
![Page 23: About the Presenter Getting Started Directory Navigation ...Directory Navigation Permissions Other Important Commands and Applications Questions About LUG/ACM Using the Shell UIC Linux](https://reader034.vdocuments.mx/reader034/viewer/2022042108/5e87c0ec8cb7df19f85432ff/html5/thumbnails/23.jpg)
About the PresenterGetting Started
Directory NavigationPermissions
Other Important Commands and ApplicationsQuestions
About LUG/ACM
Environment VariablesText EditorsOther Commands
Other Commands
I manI Ctrl-CI backtick (‘)I screen
UIC Linux Users Group Using the Shell
![Page 24: About the Presenter Getting Started Directory Navigation ...Directory Navigation Permissions Other Important Commands and Applications Questions About LUG/ACM Using the Shell UIC Linux](https://reader034.vdocuments.mx/reader034/viewer/2022042108/5e87c0ec8cb7df19f85432ff/html5/thumbnails/24.jpg)
About the PresenterGetting Started
Directory NavigationPermissions
Other Important Commands and ApplicationsQuestions
About LUG/ACM
Questions?
Questions?
UIC Linux Users Group Using the Shell
![Page 25: About the Presenter Getting Started Directory Navigation ...Directory Navigation Permissions Other Important Commands and Applications Questions About LUG/ACM Using the Shell UIC Linux](https://reader034.vdocuments.mx/reader034/viewer/2022042108/5e87c0ec8cb7df19f85432ff/html5/thumbnails/25.jpg)
About the PresenterGetting Started
Directory NavigationPermissions
Other Important Commands and ApplicationsQuestions
About LUG/ACM
About the UIC-LUG & UIC-ACM
UIC LUGI Meetings on Thursdays at 5:00 PMI in SEL 2260 (Next Door)
UIC ACMI ACM Office: SEL East 2262I Meetings on select Thursdays at 6:00 PMI in SEO 1000
UIC Linux Users Group Using the Shell