Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Apprendre Getting Started with Bash Commands | Bash Basics: Commands, Files, and Navigation
Bash Fundamentals

bookGetting Started with Bash Commands

When you start working with Bash, you are entering a powerful command-line environment that lets you interact directly with your computer's operating system. The Bash shell allows you to control files, run programs, and automate tasks—all by typing commands. This command-line interface is especially valuable for developers because it offers speed, control, and flexibility that graphical interfaces often cannot match. By learning a few essential commands, you can quickly navigate your filesystem, manage files, and begin harnessing the true power of your system.

12
# List files in the current directory ls
copy

The ls command is used to display the files and directories in your current location. By default, ls shows a simple list of names, but you can add options to get more details. For example, ls -l provides a long listing format with permissions, sizes, and dates, while ls -a shows hidden files that start with a dot. These options help you see everything in your directory and understand more about each file.

12345
# Move into a subdirectory called 'projects' cd projects # Move up one level to the parent directory cd ..
copy

The cd command changes your current working directory, which is the folder where commands are run by default. You can move into a subdirectory by specifying its name, or move up to the parent directory using ... Keeping track of your current directory is important, because Bash commands act on files and folders relative to where you are. Using cd helps you navigate efficiently through your filesystem.

Note
Definition

Definition: A shell is a program that provides a way for users to interact with the operating system, usually through a command-line interface. Bash is one of several Unix shells, and it is widely used because of its powerful features and scripting capabilities.

12
# Print the current working directory pwd
copy

The pwd command stands for print working directory. When you run it, Bash displays the full path to your current location in the filesystem. This is helpful for confirming where you are, especially after moving around with cd. Knowing your exact location helps prevent mistakes when managing files and ensures you are working in the intended directory.

1. What does the ls command do in Bash?

2. Which command is used to change the current directory in Bash?

3. What does pwd output when executed?

question mark

What does the ls command do in Bash?

Select the correct answer

question mark

Which command is used to change the current directory in Bash?

Select the correct answer

question mark

What does pwd output when executed?

Select the correct answer

Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 1. Chapitre 1

Demandez à l'IA

expand

Demandez à l'IA

ChatGPT

Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion

Suggested prompts:

What are some other useful Bash commands for beginners?

Can you explain more about file permissions shown with `ls -l`?

How do I create or delete files and directories in Bash?

bookGetting Started with Bash Commands

Glissez pour afficher le menu

When you start working with Bash, you are entering a powerful command-line environment that lets you interact directly with your computer's operating system. The Bash shell allows you to control files, run programs, and automate tasks—all by typing commands. This command-line interface is especially valuable for developers because it offers speed, control, and flexibility that graphical interfaces often cannot match. By learning a few essential commands, you can quickly navigate your filesystem, manage files, and begin harnessing the true power of your system.

12
# List files in the current directory ls
copy

The ls command is used to display the files and directories in your current location. By default, ls shows a simple list of names, but you can add options to get more details. For example, ls -l provides a long listing format with permissions, sizes, and dates, while ls -a shows hidden files that start with a dot. These options help you see everything in your directory and understand more about each file.

12345
# Move into a subdirectory called 'projects' cd projects # Move up one level to the parent directory cd ..
copy

The cd command changes your current working directory, which is the folder where commands are run by default. You can move into a subdirectory by specifying its name, or move up to the parent directory using ... Keeping track of your current directory is important, because Bash commands act on files and folders relative to where you are. Using cd helps you navigate efficiently through your filesystem.

Note
Definition

Definition: A shell is a program that provides a way for users to interact with the operating system, usually through a command-line interface. Bash is one of several Unix shells, and it is widely used because of its powerful features and scripting capabilities.

12
# Print the current working directory pwd
copy

The pwd command stands for print working directory. When you run it, Bash displays the full path to your current location in the filesystem. This is helpful for confirming where you are, especially after moving around with cd. Knowing your exact location helps prevent mistakes when managing files and ensures you are working in the intended directory.

1. What does the ls command do in Bash?

2. Which command is used to change the current directory in Bash?

3. What does pwd output when executed?

question mark

What does the ls command do in Bash?

Select the correct answer

question mark

Which command is used to change the current directory in Bash?

Select the correct answer

question mark

What does pwd output when executed?

Select the correct answer

Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 1. Chapitre 1
some-alt