SlideShare a Scribd company logo
1 of 15
The “cd” (Change Directory)
Command
Mac Terminal Tutorial
“ls” to list all the contents of the current directory so
that we can see where we want to change
directory into.
“cd” (Change Directory) into the Desktop directory by typing
“cd Desktop”. This works for any directory that’s within the
current directory. SYNTAX: cd dirName
To Change Directory (cd) into a directory that has a
space in its name, place the folder’s (directory’s)
name in quotation marks (“folder name”). This
makes it so that the “cd” command sees the two
words as one argument.
In this example I first attempted to Change Directory by simply typing my folder. It
didn’t work because there is no directory (folder) with the name of “my”. So it threw an
error. I corrected this by putting the “directory name” in quotation marks. I could’ve
also used the escape character  before the space to tell the program to ignore space
Typing “..” after a filesystem command
references the “Parent Directory”. What
we are saying here is…
Change Directory into the “Parent
Directory”.
Parent Directory - the directory our
working directory is in.
To teach the next slide I need to first show the
order of directories we’ll be working with.
“my folder” is in the “Desktop” directory…
“Tutorials” is in the “my folder” directory..
In this Command what I was wanting to do was to change
into the “Tutorials” directory which is a “sub-directory” of
the “my folder” directory -- which is a “sub-directory” of the
“Desktop” directory.
“cd” dirName/subDirName
If we want to get back to the “parent’s parent
directory” we just change directory (cd) and
provide it the argument of “../..”. You may
remember that “..” changes our directory to the
parent directory….so this is just an extension of
that concept.
A useful shorthand for Changing Directory into the
“home (user)” directory is to simply type “cd” all by
itself.
You can also provide “cd” with a tilda “~” to
change to the “home” directory.
2 ways, same thing.
Root Directory - The directory which has no parent.
To change into the root directory from anywhere, provide “cd”
with an argument of “/”.
“cd /”
Absolute Path:
Wherever you are in the filesystem, you can always provide
the “cd” command with the “absolute file path” to the directory
you’re wanting to change into.
Absolute file path HAS to start with “root” - /
Thanks For Watching.
Please Visit:
www.HatBoySoftware.com
Jake Corn - JakeCornCodes@gmail.com

More Related Content

What's hot (20)

Linux security
Linux securityLinux security
Linux security
 
Linux
LinuxLinux
Linux
 
Step for installing linux server
Step for installing linux serverStep for installing linux server
Step for installing linux server
 
File system Os
File system OsFile system Os
File system Os
 
Active directory
Active directory Active directory
Active directory
 
Linux operating system - Overview
Linux operating system - OverviewLinux operating system - Overview
Linux operating system - Overview
 
Linux
LinuxLinux
Linux
 
Dhtml ppt (2)
Dhtml ppt (2)Dhtml ppt (2)
Dhtml ppt (2)
 
definicion de Linux
definicion de Linuxdefinicion de Linux
definicion de Linux
 
Basic command ppt
Basic command pptBasic command ppt
Basic command ppt
 
Linux commands
Linux commands Linux commands
Linux commands
 
User management
User managementUser management
User management
 
Ch 3 event driven programming
Ch 3 event driven programmingCh 3 event driven programming
Ch 3 event driven programming
 
Swap Administration in linux platform
Swap Administration in linux platformSwap Administration in linux platform
Swap Administration in linux platform
 
Basics of shell programming
Basics of shell programmingBasics of shell programming
Basics of shell programming
 
lecture:Operating Syste Ms
lecture:Operating Syste Mslecture:Operating Syste Ms
lecture:Operating Syste Ms
 
Linux file system
Linux file systemLinux file system
Linux file system
 
Introduction to PowerShell
Introduction to PowerShellIntroduction to PowerShell
Introduction to PowerShell
 
Basic 50 linus command
Basic 50 linus commandBasic 50 linus command
Basic 50 linus command
 
Php mysql ppt
Php mysql pptPhp mysql ppt
Php mysql ppt
 

Viewers also liked (20)

Orientacion profesiografica
Orientacion profesiograficaOrientacion profesiografica
Orientacion profesiografica
 
CV-Saleem Vayani photo 4-Nov-2016
CV-Saleem Vayani photo 4-Nov-2016CV-Saleem Vayani photo 4-Nov-2016
CV-Saleem Vayani photo 4-Nov-2016
 
Tarea 7
Tarea 7Tarea 7
Tarea 7
 
Tekelec 870-0774-08
Tekelec 870-0774-08Tekelec 870-0774-08
Tekelec 870-0774-08
 
Uros - Aldeias flutuantes
Uros  - Aldeias flutuantesUros  - Aldeias flutuantes
Uros - Aldeias flutuantes
 
Mapa conceptual prosocialidad
Mapa conceptual prosocialidadMapa conceptual prosocialidad
Mapa conceptual prosocialidad
 
alfabetización informativa
alfabetización informativaalfabetización informativa
alfabetización informativa
 
Cajita de cambio
Cajita de cambioCajita de cambio
Cajita de cambio
 
Sistema Óseo
Sistema ÓseoSistema Óseo
Sistema Óseo
 
Inmarsat Press Final
Inmarsat Press FinalInmarsat Press Final
Inmarsat Press Final
 
Compu
CompuCompu
Compu
 
Test
TestTest
Test
 
byblosbank
byblosbankbyblosbank
byblosbank
 
Noticia de febrero
Noticia de febrero Noticia de febrero
Noticia de febrero
 
BALKANSKA CHERGA
BALKANSKA CHERGABALKANSKA CHERGA
BALKANSKA CHERGA
 
Img 0001
Img 0001Img 0001
Img 0001
 
DPOLegal
DPOLegalDPOLegal
DPOLegal
 
Trasfondo amarillo-1
Trasfondo amarillo-1Trasfondo amarillo-1
Trasfondo amarillo-1
 
Anbefaling fra ProInvent
Anbefaling fra ProInventAnbefaling fra ProInvent
Anbefaling fra ProInvent
 
O Boticário - Túnel Natal
O Boticário - Túnel NatalO Boticário - Túnel Natal
O Boticário - Túnel Natal
 

Similar to cd - The Change Directory Command

Directory Commands - R.D.Sivakumar
Directory Commands - R.D.SivakumarDirectory Commands - R.D.Sivakumar
Directory Commands - R.D.SivakumarSivakumar R D .
 
intro unix/linux 07
intro unix/linux 07intro unix/linux 07
intro unix/linux 07duquoi
 
Basics of UNIX Commands
Basics of UNIX CommandsBasics of UNIX Commands
Basics of UNIX CommandsSubra Das
 
Basic shell programs assignment 1_solution_manual
Basic shell programs assignment 1_solution_manualBasic shell programs assignment 1_solution_manual
Basic shell programs assignment 1_solution_manualKuntal Bhowmick
 
Command Line Tools
Command Line ToolsCommand Line Tools
Command Line ToolsDavid Harris
 
Course 102: Lecture 3: Basic Concepts And Commands
Course 102: Lecture 3: Basic Concepts And Commands Course 102: Lecture 3: Basic Concepts And Commands
Course 102: Lecture 3: Basic Concepts And Commands Ahmed El-Arabawy
 
BITS: Introduction to Linux - Text manipulation tools for bioinformatics
BITS: Introduction to Linux - Text manipulation tools for bioinformaticsBITS: Introduction to Linux - Text manipulation tools for bioinformatics
BITS: Introduction to Linux - Text manipulation tools for bioinformaticsBITS
 
linux commands.pdf
linux commands.pdflinux commands.pdf
linux commands.pdfamitkamble79
 
Directory Management in Unix
 Directory Management in Unix Directory Management in Unix
Directory Management in UnixVpmv
 
Linux - Directory commands
Linux - Directory commandsLinux - Directory commands
Linux - Directory commandsjoesofi
 
Linux_Commands.pdf
Linux_Commands.pdfLinux_Commands.pdf
Linux_Commands.pdfMarsMox
 

Similar to cd - The Change Directory Command (20)

Basic linux commands
Basic linux commandsBasic linux commands
Basic linux commands
 
LinuxLabBasics.ppt
LinuxLabBasics.pptLinuxLabBasics.ppt
LinuxLabBasics.ppt
 
Linux Commands.pptx
Linux Commands.pptxLinux Commands.pptx
Linux Commands.pptx
 
unix_commands.ppt
unix_commands.pptunix_commands.ppt
unix_commands.ppt
 
Directory Commands - R.D.Sivakumar
Directory Commands - R.D.SivakumarDirectory Commands - R.D.Sivakumar
Directory Commands - R.D.Sivakumar
 
intro unix/linux 07
intro unix/linux 07intro unix/linux 07
intro unix/linux 07
 
Linux
LinuxLinux
Linux
 
Linux cheat sheet
Linux cheat sheetLinux cheat sheet
Linux cheat sheet
 
Basics of UNIX Commands
Basics of UNIX CommandsBasics of UNIX Commands
Basics of UNIX Commands
 
Part 2
Part 2Part 2
Part 2
 
Basic shell programs assignment 1_solution_manual
Basic shell programs assignment 1_solution_manualBasic shell programs assignment 1_solution_manual
Basic shell programs assignment 1_solution_manual
 
Command Line Tools
Command Line ToolsCommand Line Tools
Command Line Tools
 
Unix Basics For Testers
Unix Basics For TestersUnix Basics For Testers
Unix Basics For Testers
 
Course 102: Lecture 3: Basic Concepts And Commands
Course 102: Lecture 3: Basic Concepts And Commands Course 102: Lecture 3: Basic Concepts And Commands
Course 102: Lecture 3: Basic Concepts And Commands
 
BITS: Introduction to Linux - Text manipulation tools for bioinformatics
BITS: Introduction to Linux - Text manipulation tools for bioinformaticsBITS: Introduction to Linux - Text manipulation tools for bioinformatics
BITS: Introduction to Linux - Text manipulation tools for bioinformatics
 
linux commands.pdf
linux commands.pdflinux commands.pdf
linux commands.pdf
 
Directory Management in Unix
 Directory Management in Unix Directory Management in Unix
Directory Management in Unix
 
Linux[122-150].pdf
Linux[122-150].pdfLinux[122-150].pdf
Linux[122-150].pdf
 
Linux - Directory commands
Linux - Directory commandsLinux - Directory commands
Linux - Directory commands
 
Linux_Commands.pdf
Linux_Commands.pdfLinux_Commands.pdf
Linux_Commands.pdf
 

Recently uploaded

What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....kzayra69
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)jennyeacort
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noidabntitsolutionsrishis
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 

Recently uploaded (20)

What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 

cd - The Change Directory Command

  • 1. The “cd” (Change Directory) Command Mac Terminal Tutorial
  • 2.
  • 3. “ls” to list all the contents of the current directory so that we can see where we want to change directory into.
  • 4. “cd” (Change Directory) into the Desktop directory by typing “cd Desktop”. This works for any directory that’s within the current directory. SYNTAX: cd dirName
  • 5. To Change Directory (cd) into a directory that has a space in its name, place the folder’s (directory’s) name in quotation marks (“folder name”). This makes it so that the “cd” command sees the two words as one argument.
  • 6. In this example I first attempted to Change Directory by simply typing my folder. It didn’t work because there is no directory (folder) with the name of “my”. So it threw an error. I corrected this by putting the “directory name” in quotation marks. I could’ve also used the escape character before the space to tell the program to ignore space
  • 7. Typing “..” after a filesystem command references the “Parent Directory”. What we are saying here is… Change Directory into the “Parent Directory”. Parent Directory - the directory our working directory is in.
  • 8. To teach the next slide I need to first show the order of directories we’ll be working with. “my folder” is in the “Desktop” directory… “Tutorials” is in the “my folder” directory..
  • 9. In this Command what I was wanting to do was to change into the “Tutorials” directory which is a “sub-directory” of the “my folder” directory -- which is a “sub-directory” of the “Desktop” directory. “cd” dirName/subDirName
  • 10. If we want to get back to the “parent’s parent directory” we just change directory (cd) and provide it the argument of “../..”. You may remember that “..” changes our directory to the parent directory….so this is just an extension of that concept.
  • 11. A useful shorthand for Changing Directory into the “home (user)” directory is to simply type “cd” all by itself.
  • 12. You can also provide “cd” with a tilda “~” to change to the “home” directory. 2 ways, same thing.
  • 13. Root Directory - The directory which has no parent. To change into the root directory from anywhere, provide “cd” with an argument of “/”. “cd /”
  • 14. Absolute Path: Wherever you are in the filesystem, you can always provide the “cd” command with the “absolute file path” to the directory you’re wanting to change into. Absolute file path HAS to start with “root” - /
  • 15. Thanks For Watching. Please Visit: www.HatBoySoftware.com Jake Corn - JakeCornCodes@gmail.com