How to Use Bash
Learn how to navigate directories and list contents., Learn how to manage files and directories., Learn how to edit files with text editors., Learn how to search., Learn how to network., Learn how to use multimedia software from the command-line...
Step-by-Step Guide
-
Step 1: Learn how to navigate directories and list contents.
ls will list contents of a directory. cd will change directory. cd .. will change up a directory level. -
Step 2: Learn how to manage files and directories.
Creating, copying, moving, renaming, deleting and setting permissions.
Midnight Commander is a command-line Orthodox File Manager. mkdir will create a directory. cp will copy a file. mv will move or rename a file. rm will remove a file. chmod will set file permissions. , nano is a common command-line text editor. vi is a common and very powerful text editor. , grep is popular and powerful tool for searching for expressions within files.
Use Regular Expressions such as dot-asterisk ".*" as a wildcard. find will find files that meet some condition. locate will find files anywhere on the system by name. , You can connect to the internet via the command-line. ifconfig and iwconfig are widely-used to configure network settings. ifup and ifdown will often start and stop, respectively, network connections.
Most current desktop-oriented Linux systems use NetworkManager, which disables most command-line configuration for networking. , ImageMagick is a good graphics editor. , Adding, removing, changing passwords can be done via the command-line. adduser(sometimes useradd) is a command line tool to add users. , man and info are the programs that describe commands. ,, e.g. "echo first,second,third | cut
-d '
'
-f 2" prints "second". , "ls >file_listing.txt" will put a list of all files in the current directory in the file "file_listing.txt".
Any command may accept input from a file with '<' e.g. bash <command_list.txt -
Step 3: Learn how to edit files with text editors.
-
Step 4: Learn how to search.
-
Step 5: Learn how to network.
-
Step 6: Learn how to use multimedia software from the command-line.
-
Step 7: Learn how to manage users.
-
Step 8: Get help.
-
Step 9: Bash has a lot of other commands built-in "if" chooses different actions based on the result of a command or test "for" repeats a command for each value in a set "case" chooses one of several actions based on a value
-
Step 10: Bash uses a pipeline to perform complex tasks A pipeline is created when the output from one command is connected to the input of another command using the "|" character.
-
Step 11: Bash can redirect input and output The output of any command may be written in a file with '>' e.g.
Detailed Guide
ls will list contents of a directory. cd will change directory. cd .. will change up a directory level.
Creating, copying, moving, renaming, deleting and setting permissions.
Midnight Commander is a command-line Orthodox File Manager. mkdir will create a directory. cp will copy a file. mv will move or rename a file. rm will remove a file. chmod will set file permissions. , nano is a common command-line text editor. vi is a common and very powerful text editor. , grep is popular and powerful tool for searching for expressions within files.
Use Regular Expressions such as dot-asterisk ".*" as a wildcard. find will find files that meet some condition. locate will find files anywhere on the system by name. , You can connect to the internet via the command-line. ifconfig and iwconfig are widely-used to configure network settings. ifup and ifdown will often start and stop, respectively, network connections.
Most current desktop-oriented Linux systems use NetworkManager, which disables most command-line configuration for networking. , ImageMagick is a good graphics editor. , Adding, removing, changing passwords can be done via the command-line. adduser(sometimes useradd) is a command line tool to add users. , man and info are the programs that describe commands. ,, e.g. "echo first,second,third | cut
-d '
'
-f 2" prints "second". , "ls >file_listing.txt" will put a list of all files in the current directory in the file "file_listing.txt".
Any command may accept input from a file with '<' e.g. bash <command_list.txt
About the Author
Shirley Jenkins
With a background in realestate, Shirley Jenkins brings 5 years of hands-on experience to every article. Shirley believes in making complex topics accessible to everyone.
Rate This Guide
How helpful was this guide? Click to rate: