Skip to main content

Basics - More Bash Scripting

You could start your learning here:

Reading Documentation about Commands#

The Edx Link (Chapter 8)

  • man COMMAND
  • COMMAND -h or COMMAND --help

Quick Reference - Basic Commands#

  • cat,less,more to print files,
  • head, tail to print only the two ends of the file
  • grep "text" to filter the output of the stdout pipe (Ref)
  • check network by ping,ifconfig,iwconfig
  • check USB devices by lsusb
  • check harddrive (block device) by lsblk
  • check device messages by dmesg or dmesg -w
  • check services by sudo systemctl status and similar command of start, stop, restart

.bashrc and .profile file#

They are scripts that are automatically run by the shell when you open a new terminal. They can be quite useful in setting up environment variables like PATH, and running scripts.

https://serverfault.com/questions/261802/what-are-the-functional-differences-between-profile-bash-profile-and-bashrc

Last updated on