Тёмный

Bash Scripting for Beginners: Complete Guide to Getting Started - Hello World (Part 2) 

Learn Linux TV
Подписаться 678 тыс.
Просмотров 152 тыс.
50% 1

Moore's Law of computing is very debatable nowadays, but one tech-related concept that's absolutely NOT debatable is that everyone learning any scripting or programming language should start with the classic "Hello World" example. And you know what? LearnLinuxTV is a sucker for tradition. So in this episode, you'll write your very own Hello World script in Bash!
🎓 BRAND NEW UDEMY COURSES AVAILABLE!
Check out my new courses on Udemy and take your learning even further!
• Getting Started with Ansible: Automation Made Easy ➜ learnlinux.link/ansible
• LPI Linux Essentials Complete Course & Workshop ➜ learnlinux.link/linux-essentials
🐧 SUPPORT LINUX LEARNING!
• Grab some Linux swag ➜ merch.learnlinux.tv
• Become a Channel Member ➜ learnlinux.link/member
• Become a Patron ➜ learnlinux.link/patron
• 5% discount on LPI exam vouchers ➜ learnlinux.link/lpi-voucher
• Check out my latest book ➜ ubuntuserverbook.com
• Grab an awesome Pi-powered KVM ➜ learnlinux.link/tinypilot
• Jay's Gear - Server, Computer and Video Production Stuff ➜ learnlinux.link/amazon
Note: Royalties and/or commission is earned from each of the above links
⏰ TIME CODES
00:00 - Intro
01:03 - What is a Shell in Linux?
05:03 - How to turn Linux command(s) into a Bash Script
06:40 - Marking a script file as executable with chmod
08:32 - How do you run/execute a Bash Script?
12:37 - How to (properly) write a Bash Script
OTHER BASH SCRIPTING SERIES EPISODES
- Class 01 ➜ Introduction: linux.video/bash1
- Class 02 ➜ Hello World: linux.video/bash2
- Class 03 ➜ Variables: linux.video/bash3
- Class 04 ➜ Math Functions: linux.video/bash4
- Class 05 ➜ If Statements: linux.video/bash5
- Class 06 ➜ Exit Codes: linux.video/bash6
- Class 07 ➜ While Loops: linux.video/bash7
- Class 08 ➜ Universal Update Script: linux.video/bash8
- Class 09 ➜ For Loops: linux.video/bash9
- Class 10 ➜ Where To Store Your Scripts: linux.video/bash10
- Class 11 ➜ Data Streams: linux.video/bash11
- Class 12 ➜ Functions: linux.video/bash12
- Class 13 ➜ Case Statements: linux.video/bash13
- Class 14 ➜ Scheduling Jobs (Part 1): linux.video/bash14
- Class 15 ➜ Scheduling Jobs (Part 2): linux.video/bash15
- Class 16 ➜ Arguments: linux.video/bash16
- Class 17 ➜ Building a Backup Script: linux.video/bash17
- Class 18 ➜ Closing: linux.video/bash18*🎓 FULL LINUX COURSES FROM LEARN LINUX TV*
• Linux Crash Course ➜ linux.video/cc
• Learn tmux ➜ linux.video/tmux
• Learn vim ➜ linux.video/vim
• Bash Scripting Series ➜ linux.video/bash
• Proxmox VE ➜ linux.video/pve
• Getting Started with Ansible (Udemy) ➜ learnlinux.link/ansible
• LPI Linux Essentials Workshop (Udemy) ➜ learnlinux.link/linux-essentials
🌐 LEARN LINUX TV ON THE WEB
• Main site ➜ www.learnlinux.tv
• Community ➜ community.learnlinux.tv
• Official Github Account ➜ github.com/LearnLinuxTV
• Enterprise Linux Security Podcast ➜ enterpriselinuxsecurity.show
• The Homelab Show Podcast ➜ thehomelab.show
• Jay on Udemy ➜ www.udemy.com/user/jay-lacroix-3
• Jay on Twitter ➜ x.com/JayTheLinuxGuy
• Content Ethics ➜ www.learnlinux.tv/content-ethics
• Request Assistance ➜ www.learnlinux.tv/request-ass...
⚠️ DISCLAIMER
Learn Linux TV provides technical content that will hopefully be helpful to you and teach you something new. However, this content is provided without any warranty (expressed or implied). Learn Linux TV is not responsible for any damages that may arise from any use of this content. Always make sure you have written permission before working with any infrastructure and that you are compliant with all company rules, change control procedures, and local laws.
#Linux #LinuxCourse #ITTraining

Наука

Опубликовано:

 

20 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 114   
@Capitaine.Albator
@Capitaine.Albator Год назад
I think that this is why RU-vid was created for. Thanks 👍🏻✌🏻🇨🇦
@ojochegbe_
@ojochegbe_ Год назад
Hi bro can we learn together
@usuarioanonimo789
@usuarioanonimo789 2 месяца назад
​@@ojochegbe_no
@skyedunphy
@skyedunphy Месяц назад
@@usuarioanonimo789 well, sad
@usuarioanonimo789
@usuarioanonimo789 Месяц назад
@@skyedunphy just i be see that video, sorry for my inglés im learning
@katofhyrule12
@katofhyrule12 3 месяца назад
Thank you! Before watching this video, I was able to complete my homework, but I did not UNDERSTAND it. I am now ready to move on to my next homework assignment. Thanks so much!
@lavinnasays
@lavinnasays 7 дней назад
This is a terrific video. I have been trying to find a good resource for quite a few days now. They go on and on about all the commands used. But none showed how to execute a file in the very beginning. By doing so, you have made me realize the scope of bash scripting in the most efficient way. Thank you.
@AyalaStudios
@AyalaStudios 3 месяца назад
Hey Jay! I started watching your videos this past month and I can see the progress you've made from the uploads 4 years ago to the uploads today! Your way of explaining topics seems to have always been awesome - but your camera presence has definitely improved over the years! I just want to thank you for creating the content and show my appreciation. Your instruction is the the kind that many people can benefit from and I hope you continue to create amazing content!
@jimrakel418
@jimrakel418 Год назад
Thanks Jay! I spent a lot of time last week trying to find a good video series on bash scripting and today I finally did!
@theena
@theena Год назад
Thank you, Jay. This is super useful. Kinda genius to put the entire thing online at the same time too. Perfect chunks for a person like me. Thanks again.
@demolazer
@demolazer 6 месяцев назад
I've just learned basic bash scripting and I can see this getting addictive. As soon as I do something in multiple commands I immediately think of building a script or .src function. First is mkcd to make and go into a directory. Then mkpyapp [packages] to make the common app structure I use, create a venv and install the rest of the arguments as packages in that venv. Finally open up folder in VS code. Then actscript to put bash script in ~/bin and make executable. Any many more in the pipeline... It's so much fun! Look forward to learning more here
@marcuswest4572
@marcuswest4572 Год назад
Terrific. Excellent visual presentation and clarity and good vibes in equal measure. Keep bashing out quality stuff Jay
@blackyonbi
@blackyonbi Год назад
Many people complain about social media and what not, but i do thank you so much for using this amazing tool to share your knowledge.
@kencreten7308
@kencreten7308 Год назад
I've used bash for years and years. This such a great course. Your presentation is - super pro, and enjoyable.
@johnkevin1030
@johnkevin1030 2 месяца назад
Dont lie. If you have been using bash for years, theres no reason youll be here watching a hello world program
@Opin10n
@Opin10n Месяц назад
@@johnkevin1030 Tbh, I've reached max ranked in a game and sometimes I still go and watch beginner tutorials and end up learning something I didn't know before. you'd be surprised. Plus its fun to reminisce back when I knew nothing and observe how far I've came
@TheGrimPhreaker
@TheGrimPhreaker 2 месяца назад
Thanks for the easy to follow lesson! Even if it's not very useful, I did try to make my own simple scripts to see how much I retained and it was fun!
@AjayKumar-ev9zi
@AjayKumar-ev9zi 10 месяцев назад
Thanks, Jay, for this wonderful course with a smooth start!
@kannon_bach
@kannon_bach 3 месяца назад
i just completed this video. i really like the way you do things. i'm really, really looking forward to learning this, python and C++!
@user-zg3ix9sl9j
@user-zg3ix9sl9j 6 месяцев назад
You made this so simple! And how you explained it, bravo!!! Gracious!
@amaradoumbouya4119
@amaradoumbouya4119 Год назад
Thank you for sharing these full courses on RU-vid, there are better than all of paid course ❤❤
@pankajkarmakar7782
@pankajkarmakar7782 3 месяца назад
Thanks Jay !! This is my first time to watch your video. Its really informative and helpful. Subscribed for more best content!!
@temmy_rk
@temmy_rk Год назад
Thank you Jay, this is awesome! you are a great tutor!
@carrywhite4639
@carrywhite4639 3 месяца назад
Your videos make me excited about studying🙏 thank you so much❤
@rn9085
@rn9085 9 месяцев назад
This is just awesome. Perfectly explained.
@ivandelevic
@ivandelevic Год назад
Very good video for beginners.
@chesterbelle
@chesterbelle Год назад
ty bro i really love how you teach, easy and simple, English its not my native language and im still able to do it ty
@ibrahimabdeltawab6418
@ibrahimabdeltawab6418 Год назад
So informative! Thanks so much
@fabutrash
@fabutrash 6 месяцев назад
Thank you very much. Great pacing and explanation.
@hemantdhiman6179
@hemantdhiman6179 11 месяцев назад
great jay!!! nice info in the first lecture!!!
@neverless_person1012
@neverless_person1012 3 месяца назад
Your explanations is great! Thank you! Also watched the video about permissions for files and directories. Now I don't scared of this magic letters "rwx" and digits!
@Lightcode777
@Lightcode777 11 месяцев назад
Thank you so much for this course!!!!!
@veronicarainin5045
@veronicarainin5045 9 месяцев назад
Excellent tutorial. Thank you
@venkateshiyer5073
@venkateshiyer5073 Год назад
absolutely amazing, thank you sir !
@FririkurEllefsen
@FririkurEllefsen Год назад
Great lesson. Learned a lot
@jojobobbubble5688
@jojobobbubble5688 Год назад
I might recommend this course to my Boss. We manage Macs with an MDM and this would be handy for both of us
@12Q46HPRN
@12Q46HPRN Год назад
Great video! I am looking forward to watching the rest of the series. Any thoughts on: #!/bin/bash vs #!/usr/bin/env bash ? I see them both and was wondering if one is "better" than the other to use.
@venkateshiyer5073
@venkateshiyer5073 Год назад
same doubt, is there a difference between the two that i should know?
@richasinghal3611
@richasinghal3611 Год назад
Good start!!
@zamolxezamolxe8131
@zamolxezamolxe8131 5 месяцев назад
Brilliant! Too bad my professors in the uni did not have such a way to teach things like you do!
@mahdikhalili5927
@mahdikhalili5927 3 месяца назад
its very good. thanks!
@felixkimutai8478
@felixkimutai8478 8 дней назад
Thank you Jay
@safiullahnoori2659
@safiullahnoori2659 4 месяца назад
We need more training and tutorial thanks you guide and teaching.
@funkemonke9537
@funkemonke9537 Год назад
Thank you so much man.
@catreunion
@catreunion Год назад
Thank you teacher 🙏🏻
@haltutor8014
@haltutor8014 Год назад
thanks for this short course. confused: which bash shows /usr/bin/bash, but the she-bang says /bin/bash. why the difference?
@wifii_millionaire_
@wifii_millionaire_ 7 месяцев назад
very super cours i simply understand bash script
@sureshabu
@sureshabu 3 месяца назад
Thanks a ton!
@danielnadar75
@danielnadar75 Год назад
Jay! You are so awesome ❤ Thanks for sharing your invaluable Linux knowledge and Love with all of us!
@mehdismaeili3743
@mehdismaeili3743 4 месяца назад
Excellent.
@abelashenafi6291
@abelashenafi6291 Год назад
Thanks a lot bro.
@13thravenpurple94
@13thravenpurple94 Год назад
Great video THank you
@samiramir91samor78
@samiramir91samor78 Год назад
Great Work :)
@barkhadibraahim1023
@barkhadibraahim1023 2 месяца назад
thanks so much
@hassam1117
@hassam1117 Год назад
Hi jay . Thank you for vim training and I learn a lot . Now starting script training and thank for all your time and training. Mr. Jay I am not sure why you use nano for training script. I was expecting to use vim. I am sure you know better or may be nano is better to writ script. Thank you again.
@Royaleah
@Royaleah Год назад
Is it just me? I always put 'exit 0' at the end of my scripts. Even if I don't have other exit values else where in the script.
@jimmyrichards5595
@jimmyrichards5595 Год назад
Same here.
@BeltrameJuan
@BeltrameJuan 8 месяцев назад
Thank you!
@isrargaming2849
@isrargaming2849 10 месяцев назад
Its awesome clear
@thaidoan868
@thaidoan868 3 месяца назад
Thank you
@idan4848
@idan4848 Год назад
thank you very much!!!!
@VideosRichy
@VideosRichy 2 месяца назад
thank you!!
@marble_wraith
@marble_wraith Год назад
What about POSIX compliance? Wouldn't it be better to go that route instead for compatibility? That being the case, why not code for dash instead of bash? The resulting script should be executable in dash, bash and zsh (with compatibility mode).
@kushal836
@kushal836 Год назад
loved it sir thankyou for posting this content still watching and learning from it !!!!
@YannMetalhead
@YannMetalhead 10 месяцев назад
Good video!
@bikabrown6808
@bikabrown6808 11 месяцев назад
Thanks 😊
@Bugzbunni_
@Bugzbunni_ 11 месяцев назад
good videos my dude
@oseaniic
@oseaniic 11 месяцев назад
Thanks!
@kainaatmakhani6550
@kainaatmakhani6550 Год назад
informative lecture
@tatsutakamaro
@tatsutakamaro 8 дней назад
8:40 - hi! I've got two questions. 1. What for did you add "./" in front of a script name? 2. Why didn't the script show objects' names in colors. If it does the same as the command ls, then the result should be the same I suppose.
@jocelynmedina906
@jocelynmedina906 Год назад
Thanks
@leonel_carrizo
@leonel_carrizo Год назад
thanks!
@ashisharya65
@ashisharya65 7 месяцев назад
HI Jay, Could you please share what is the font that you are using on your terminal.
@simonkalu
@simonkalu 9 месяцев назад
Awesome
@tinacole1450
@tinacole1450 8 месяцев назад
I simple used chsh -s /bin/bash and restarted to change. Later I changed it back to zsh
@fictitiousnightmares
@fictitiousnightmares Год назад
8:48 I'm curious why when it showed the contents of the directory it doesn't color the folders and such like it did when you just typed ls? Not nearly as useful as a script.
@Houndwar
@Houndwar 6 месяцев назад
Hey jay @learn linuxtv how can u change ur terminal to have those colors.. can u do a vid showing us how to manage our terminal appearance, I am aware that u said u have a variation but I'm sure we can change colors and stuff..
@adamekhobba2156
@adamekhobba2156 11 месяцев назад
YOUR ARE GREAT
@sussusamogus7831
@sussusamogus7831 Год назад
thanks :)
@user-hb8ex6gu2t
@user-hb8ex6gu2t 20 дней назад
🥰🥰thanks sir
@JackHammaH9000
@JackHammaH9000 7 месяцев назад
hey, i switched to bash, it was on zsh on kali; now when i type commands like sudo, ls they don't "change color" the command works but they don't change, anyone having the same "problem" ? thx
@csharpner
@csharpner Год назад
The "Jay Challenge". Make an entire video without saying the word "Well". Go! ;) Great videos, BTW!
@ClevelandEscape
@ClevelandEscape 6 месяцев назад
For some reason mine isnt changing colors in terminal when i run nano
@cavenmasetla8740
@cavenmasetla8740 Год назад
This is so beautiful but I'm so intimidated by the IF statements. I have goosebums☹☹☹☹
@manojkumar-jt3fw
@manojkumar-jt3fw Год назад
Please suggest me a Bash Scripting Reference textbook please
@user-py7vj6dv4j
@user-py7vj6dv4j 10 месяцев назад
is learning bash script have afuture and get jobs in devops or aws engineer?
@Sashin9000
@Sashin9000 9 месяцев назад
I like your gnome shirt
@user-rc1jg2rf3h
@user-rc1jg2rf3h 5 месяцев назад
how do you install that on windows i mean that interpreter looks clean
@guilherme5094
@guilherme5094 Год назад
👍
@tatsutakamaro
@tatsutakamaro 8 дней назад
If there's no sense in .sh extension, how does Linux know that it is a bash script? For example, in html we have a header line. But here there's no header. What if a file is in ZSH but has an .sh (bash) extension?
@tatsutakamaro
@tatsutakamaro 8 дней назад
Already saw it. She bangs, okay.
@g-jalil6961
@g-jalil6961 Год назад
😊
@luciengrondin5802
@luciengrondin5802 Год назад
There is no need to search for bash with `which` in order to execute it. In case your default shell is not bash, and assuming bash is installed, it should be in the PATH so you can just type `bash`, or even `exec bash` to replace the current shell.
@user-lu2hu4cc5h
@user-lu2hu4cc5h 4 месяца назад
my linux vm still says zsh. any solution?
@syedanas2823
@syedanas2823 4 месяца назад
is it okay to use kali for bash scripting cause mine directory is /zsh
@rickgrimes47
@rickgrimes47 4 месяца назад
yeah it's fine, I also use kali.
@rickgrimes47
@rickgrimes47 4 месяца назад
did you dual boot it?
@syedanas2823
@syedanas2823 4 месяца назад
@@rickgrimes47 no been doing it in virtual mach
@yusufalfatih8276
@yusufalfatih8276 8 месяцев назад
How you made the like button shining ?🤔
@cagataytekin6372
@cagataytekin6372 5 месяцев назад
buyuksun hoca
@Alpha_Sadigh
@Alpha_Sadigh Год назад
☯🙏
@craigozancin
@craigozancin Год назад
Why are you using sudo chmod for a file you own. The use of sudo is only needed if you do not own the file.
@TheGacko
@TheGacko Год назад
yes was going to say -- no need to sudo chmod files in your own home folder.
@HadToChangeMyName_YoutubeSucks
lol...was looking to see if anyone else noticed
@Abdirahmaann
@Abdirahmaann Год назад
Kkkk
@franciscoromogaray3076
@franciscoromogaray3076 6 месяцев назад
banger
@Ollital
@Ollital Год назад
I'm wondering who first came up with the name "shebang" 🙂
@soupmachine5831
@soupmachine5831 Год назад
first
@anonim11366
@anonim11366 7 месяцев назад
I think you need to talk less and teach more
@cryptovadkan7496
@cryptovadkan7496 8 месяцев назад
# echo $SHELL /usr/bin/zsh Can I take this course even though there's a zsh instead of bash on my system?
@ineme-awajiogwuafi5138
@ineme-awajiogwuafi5138 Год назад
thank you very much
@patrob3885
@patrob3885 Год назад
Thank you
Далее
Bash vs Zsh vs Fish vs Tcsh vs Ksh
8:11
Просмотров 67
This or That 🛍️
00:52
Просмотров 4,2 млн
МИГРАНТ ВА ПОЛИЦИЯ 😂👍
00:12
Просмотров 316 тыс.
212 Bash Scripting Examples
4:46:06
Просмотров 127 тыс.
100+ Linux Things you Need to Know
12:23
Просмотров 820 тыс.
Razer's new keyboard is basically cheating.
7:42
Просмотров 286 тыс.
you need to learn BASH Scripting RIGHT NOW!! // EP 1
12:14
Why Linux is better for (most) developers!
14:59
Просмотров 467 тыс.
this BASH script will make you a MILLIONAIRE
19:20
Просмотров 708 тыс.
iPhone 16 - НЕ СТОИТ ПРОПУСКАТЬ
4:50