How to use bash shell

www.lau‮t‬turi.com
How to use bash shell

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:

  1. cd: Change the current working directory. For example, cd /home/user will change the current working directory to /home/user.

  2. 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.

  3. pwd: Print the current working directory.

  4. mkdir: Create a new directory. For example, mkdir newdir will create a new directory called newdir.

  5. touch: Create a new empty file. For example, touch newfile.txt will create a new empty file called newfile.txt.

  6. 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.

  7. cp: Copy a file or directory. For example, cp file.txt /home/user will copy the file file.txt to the /home/user directory.

  8. 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.

Created Time:2017-10-29 22:08:40  Author:lautturi