Bash & Terminal

I’ve been asking so many questions, but I just keep finding new things that I want to know, and I feel like this community is a mix of different knowledge, experiences, and preferences, so asking here might give me more relatable or practical answers.
So I know what Bash is now that I’ve looked around and asked some people, but nobody I know has really used it personally, so I guess I want to know a few things.
Terminal can do a lot of different things, and you can use it to run code in different languages as well such as python, java, etc.
Bash is different though, and I don’t really know what to do with it.
I guess since I know what it is, and I also know that quite a few of you use linux and the command line, that you’d be able to tell me what you use it for and also maybe where to learn how to use it.
Just how much can you do with it? I’m running terminal on a MacOS, but I’m pretty sure that I’m one of the very few that do. (use Mac)
Honestly, the only thing I can do with terminal is make popup windows, but in all seriousness, I have really been looking more into the command line lately and I really want to use CLI more rather than the GUI.
edit: not that I don’t want to use GUI because I appreciate my user interface, and couldn’t get away with not using it, but I just don’t want to solely rely on it and I want to be more versed and have a better understanding of the command line with Bash and Terminal.

from wikipedia:

Bash is a Unix shell and command language written by Brian Fox for the GNU Project as a free software replacement for the Bourne shell.[7][8] First released in 1989,[9] it has been distributed widely as it is a default shell on the major Linux distributions and macOS (formerly OS X). In 2016 it was also made available by Microsoft for use in Windows 10 Anniversary Update, albeit it is not installed by defaul

we can do so much in command line, and once we can do something in the command line, we can script it.

i don’t even know where to start what you can in the command line, it is to much. Today i downloaded a bunch of files, but there where also unwanted .msi files, so i opened the command line and typed:

rm *.msi

this will remove all msi files, yes, i could have done this in the graphical environment, ctrl + click, ctrl + click and so on, it would have taken longer.

you can access ftp, sftp through the command line. i wrote a script in BASH which i assigned a key combination to switch the sound on/off, even for an external speaker, or if a hdmi is connected, output sound to hdmi. (i know, mac automatically set the sound to hdmi)

you can navigate the file system, move files, remove files (and script this, so clean your bin every week)

if i download mp3 files with transmission, they are automatically moved to my music directory.

you can access so many programs through the command line.

There are command line video players, music players and so much more. (i use the command line music player, since you can configure this to be user independent)

remote access with ssh, with command line.

git i prefer to use the command line

Too much to list here, there is so much you can do with Bash

of course there are certain things you can do with python, but for example replace all words in a file with another word can be super simple with sed, where this would be more difficult in python

The question is always, what is the best language for the job?

1 Like

Wow this is a lot to process.
Is bash what linux primarily uses? I also guess I just have to learn it by using it. I’ll have to redo the command line course and try to find more resources.
I appreciate you taking the time to write this. I knew you used the command line and I was hoping you would respond.
I’m going to look more into learning it. Thanks again! :))

bash ships standard with a lot of linux distro’s (and many unix derivatives, including macOS), but linux being linux you can install another shell (for example zsh)

yes, the command line course on codecademy teaches the basics, but there are plenty more resources online.

i always find this picturing enlightening:

hardware = your pc
kernel = bridge between hardware and software
because the shell (bash) is so low, it can interact with much of the OS. including panel (taskbar), quit useful.

1 Like

I like this a lot, thanks. I’m going to really try to dig deeper. I know I’ve mentioned wanting to get involved with the command line for a while now, but I guess now’s the time. :slight_smile:

here is a recommendation: edx -> introduction to linux (its free, the course, not the certificate)

I know this is linux, but they also teach command line. And you will see that there are huge similarities between macOS and linux

1 Like

That’s super helpful, I’m going to actually do that.
Yeah, I’ve heard that macOS and linux are really similar at the base
Thank you for always looking into things for me. :slight_smile: