Bash is a Unix shell and command language that is widely used on Linux and other Unix-like systems. Here are some basic commands you can use to interact with the bash shell:
cd
: Change the current working directory. For example, cd /home/user
will change the current working directory to /home/user
.
ls
: List the contents of the current working directory. You can use the -l
flag to display the contents in a long format, and the -a
flag to show hidden files.
pwd
: Print the current working directory.
mkdir
: Create a new directory. For example, mkdir newdir
will create a new directory called newdir
.
touch
: Create a new empty file. For example, touch newfile.txt
will create a new empty file called newfile.txt
.
mv
: Move or rename a file or directory. For example, mv file.txt /home/user
will move the file file.txt
to the /home/user
directory.
cp
: Copy a file or directory. For example, cp file.txt /home/user
will copy the file file.txt
to the /home/user
directory.
rm
: Remove a file or directory. For example, rm file.txt
will delete the file file.txt
.
These are just a few basic commands that you can use with the bash shell. There are many other commands available, and you can find more information about them in the bash documentation.