Terminal vs. Bash vs. Command line vs. Prompt

Поделиться
HTML-код
  • Опубликовано: 2 авг 2024
  • Are you a secret smoothbrain who doesn't know the difference between a terminal emulator and bash? Find out the difference here so you don't look like a brainlet on R*ddit!
    My terminal emulator: github.com/lukesmithxyz/st (also in the AUR as st-luke-git)
    WEBSITE: lukesmith.xyz 🌐❓🔎
    DONATE NOW: lukesmith.xyz/donate 💰😎👌💯
  • НаукаНаука

Комментарии • 440

  • @LukeSmithxyz
    @LukeSmithxyz  3 года назад +41

    URGENT! Read this:
    lukesmith.xyz/deletion

    • @bioemiliano
      @bioemiliano 3 года назад +6

      Ok, time for finally adopting RSS.

    • @Raccoonov
      @Raccoonov 3 года назад +2

      Oh, YT at its finest bigotry... I'm with you, Luke! ) Will follow wherever you go

    • @rodi2641
      @rodi2641 3 года назад +1

      Looking at this video ...seems like you deserve it

    • @MrGrimm1337
      @MrGrimm1337 3 года назад +1

      RUclips is just for TV channels and cat videos anyway. Move on to LYBRY, Trovo or Bitchute bro :

    • @MrGrimm1337
      @MrGrimm1337 3 года назад

      PS. I love the reasons you got strikes for ! FUCK PAJEETS :

  • @DannyMexen9
    @DannyMexen9 4 года назад +315

    "All of those different things are different." - L. Smith 2019

  • @ehllie
    @ehllie 4 года назад +890

    I love your stuff Luke, but to be honest I use only like 5-10% of the tips you give. I'm here mostly for the powerful boomer energy

    • @ghostinc7
      @ghostinc7 4 года назад +25

      I only feel it when I am sipping my white monster... siiiiiiipppppp!

    • @ianpan0102
      @ianpan0102 4 года назад +42

      > I'm here mostly for the powerful boomer energy
      This. Totally this.

    • @brayden1129
      @brayden1129 4 года назад +26

      Honestly I’m here for boomer energy and minimalist programs I’ve never heard of

    • @bendover4728
      @bendover4728 4 года назад +13

      I'm only using the 10% of my brain also.

    • @abhishektyagi4428
      @abhishektyagi4428 4 года назад +2

      What is the powerful boomer energy?

  • @maxchristman
    @maxchristman 4 года назад +143

    People on stack overflow be like: 3:13-3:16

    • @codex8797
      @codex8797 2 года назад +12

      teachers who say you can ask anything (no matter how simple it may seem) when you ask a question

    • @vahidhussain8549
      @vahidhussain8549 2 года назад +2

      My like completes 69 likes

    • @jackozeehakkjuz
      @jackozeehakkjuz 2 года назад

      Also like 6:22

    • @micahgodsey455
      @micahgodsey455 Год назад

      Reddit too

  • @grjesus9979
    @grjesus9979 3 года назад +53

    So, to sum up:
    - Terminal: Program that emulates the functionality of an old terminal. Nowadays it includes much more functionalities than old days.
    - Bash: Interpreted language than is being used to interface with the computer and OS.
    - Command line: The line in wich you are writting the code inside the terminal
    - Prompt: Small portion of information, at the beginning of every command line that shows something related to the computer user or basic information about the computer within few words
    Let me know if i am wrong. Dont forget, we all are learners, dont take it seriusly.

  • @catwhisperer911
    @catwhisperer911 4 года назад +270

    I've lived all of 67 years now and it wasn't until I began watching you, Luke, that I learned I'm a boomer and that I have all these amazing powers at my disposal. Who says you can't teach an old dog new tricks? Bah! Humbug! From one boomer to another, I love your vids :)

    • @Surister0
      @Surister0 4 года назад +52

      ok boomer

    • @lostandthrown3137
      @lostandthrown3137 4 года назад +5

      @@Surister0 😸😸

    • @rodi2641
      @rodi2641 3 года назад +8

      there is nothing called as boomer...there are just smart people who continue to learn and improve throughout their lives being a valuable member of society and inspire others...you seems to be of that kind

    • @wesleyrm
      @wesleyrm 3 года назад

      Great!!

    • @AbuAl7sn1
      @AbuAl7sn1 2 года назад +1

      being old man is touching my heart
      i wish i could help u to believe in one God .
      i know u look at me like im brainwashed ، but please, by using your scientific methods just take alook at the quran
      please it will take less than a week from you
      you lived 67 years for this life , just 1 week for the other life ❤

  • @SolomonUcko
    @SolomonUcko 4 года назад +94

    2:07 Sure, you could consider bash a language. But the terminal emulator isn't running bash-the-language, it's running bash-the-shell which runs bash-the-language. (A shell is a type of interpreter.) Also, the shell you use is normally decided by a per-user configuration setting, not by the terminal emulator.

    • @deeplybrown
      @deeplybrown Год назад +4

      Thank you for this clarification.

    • @amitkumargupta-
      @amitkumargupta- 11 месяцев назад +2

      This is useful, Thank you!

  • @deeznutz2322
    @deeznutz2322 4 года назад +109

    Every video Luke uploads is another month Luke will go MIA.

    • @wallylasd
      @wallylasd 4 года назад +6

      He hides cringing profusely about what he just posted.

    • @mario_9431
      @mario_9431 4 года назад

      @Everything Because he's working on his cabin

    • @Quincycle
      @Quincycle 17 дней назад

      Prophetic

  • @davidjulien5013
    @davidjulien5013 4 года назад +177

    Me: Damn Luke, the holiday season really did improve your YT productivity !
    Luke: Don't worry kiddo, I'll go AWOL for the next 2 months.

  • @isaacrobot
    @isaacrobot 4 года назад +54

    1 day later
    Distrotube: Why use Bash or Zsh when you can AWK everything

    • @robbirobson7330
      @robbirobson7330 4 года назад +8

      you know you can run powershell on linux too

    • @YouKnowMeDuh
      @YouKnowMeDuh 4 года назад +3

      @@robbirobson7330 You serious? That's worth me looking into for work reasons then...

  • @norcal6181
    @norcal6181 4 года назад +77

    Very informative... I just have one question. How do you change the background color of Python 3.7? 😂

  • @TheNoirKamui
    @TheNoirKamui 4 года назад +10

    I have never seen this type of video before, but it is suddenly obvious that there should be more people pointing out these differences. Very good! Thank you.

  • @Nimue_Hexadragon
    @Nimue_Hexadragon 4 года назад +2

    This is SOOOOOOOO desperately needed! You made so many nice tutorials before but if this one is not cleared out of the way those tutorials could not be appreciated by newbies. Thank you so much my Tech God Luke!

  • @KingZero69
    @KingZero69 4 года назад +4

    love your explanations on stuff... always clear, concise, and complete...

  • @eds1057
    @eds1057 4 года назад +19

    9:01
    Angry command line

  • @philome4811
    @philome4811 3 года назад +3

    "bash is merely a language" "bash has this binding control C"

  • @miladabujarada
    @miladabujarada 3 года назад +10

    "Laugh at it" 100 times! No need to laugh at people you can politely correct them and explain to them so they understand. Noobs are in a learning process and the last thing they want is to be launched at. Keep doing the good work through your videos and be more sensitive towards noobs because this is a field where even the most experienced engineers have new technologies to learn almost every year. By the way I gave the video 👍🏽

  • @07areej
    @07areej 4 года назад +2

    You are very talented in explaining complex stuff. Thank you so much and keep posting videos plz.

  • @nikokral3184
    @nikokral3184 4 года назад +33

    [9:40] Sure, the prompt colors are set in the shell configuration, but they're not interpreted by the shell. It's the terminal emulator that interprets and displays them (ANSI escape codes).

    • @Mankepanke
      @Mankepanke 4 года назад +3

      They usually are in the form of prompt formatting strings like "%cb". Then the shell will emit the escape codes that your terminal supports (as written in the termcap files).

    • @humm535
      @humm535 4 года назад

      @@Mankepanke I *hope* the shell uses Terminfo and not Termcap. 🤔

    • @Mankepanke
      @Mankepanke 4 года назад +2

      @@humm535 isn't terminfo the API that read the the termcap files?

  • @ttttt_
    @ttttt_ 4 года назад +53

    "What is bash?"
    Isn't it obvious? Bash is bloat.

  • @Sierra410
    @Sierra410 4 года назад +9

    3:08 CTRL+K, CTRL+U, CTRL+Y is basically -copying- cutting and pasting in bash.
    Copying/pasting to/from clipboard in a script could fall under "copying and pasting in bash" too.

  • @bartoszmackiewicz1666
    @bartoszmackiewicz1666 4 года назад +23

    Hey, Luke! There is a way to run Python-like environment as a shell. It is called xonsh and it is a superset of Python aimed to make it more shell-like (completion, piping, history, easy access to environment variables). As far as I know it is in development but that's pretty cool project (but to be frank it has many issues, e.g. slow startup time).

  • @Thorhian
    @Thorhian 4 года назад +1

    Another awesome and informative video! Thanks Luke!

  • @atps
    @atps 4 года назад +4

    I did need this video. You answered questions I've been wondering about.

  • @annieperdue6140
    @annieperdue6140 4 года назад +1

    This is the video I was looking for, but I didn't know it until I watched it. Thanks!

  • @isandrew4466
    @isandrew4466 4 года назад +1

    I truly love your stuff Luke.

  • @ethanf30
    @ethanf30 4 года назад +1

    Great content. Keep up the good work Luke!

  • @RichardBronosky
    @RichardBronosky 4 года назад +5

    3:04 Rather than “stupid question” I’d call it an ambiguous question. As such, it is one that is NOT likely to be answered the way the asker intended. Asking how to copy/paste in bash could mean to read/write the OS clipboard, it could mean yank/put in `set -o vi` mode, it could mean to pipe into and out of `tee`, it could mean to `exec > >(tee $name.log | log -t $name)`, etc. Great info though.

  • @lukeshoty3039
    @lukeshoty3039 4 года назад +3

    Love it, when Luke's face appears in the beginning, i know it's gonna be goood. :)

  • @PHASES_OFFICIAL
    @PHASES_OFFICIAL 2 года назад +1

    This is a well done introduction video thanks a lot!

  • @netrezv
    @netrezv 4 года назад +9

    Good video!
    I'd also add in about a little difference between CLI (ls, dd, youtube-dl, pacman) and TUI (vim, newsboat, ranger, irssi) programs while on this topic, because people tend to confuse these pretty often.

    • @yash1152
      @yash1152 2 года назад

      thanks for it, yep, i had idea tthat those are different things, but didnt know the exact names. thanks for sharing

    • @netrezv
      @netrezv 2 года назад

      @@yash1152 no problem!
      I'll elaborate on the distinction a bit. As a rule of thumb, CLI software is easily scriptable, while TUI is more interactive and keyboard driven.
      If it's output can be effectively parsed using grep, it's CLI. If it has GUI-like rich interface, but on the console (usually by means of (n)curses library), it's TUI

    • @yash1152
      @yash1152 2 года назад

      @@netrezv thanks a lot for input.
      > _"ususally by means of (n)curses library"_
      yeah, i have read that curses/ncurses thing on web: "vim in ncurses based editor" but on trying to look it up surfacially, it went over my brain.
      > _"CLI = scriptable; TUI = Interactive + keyb driven"_
      so, TUI can still have some daily use applications like ViM editor, ViEB browser, etc. But the scope of CLI is very different than normal applications right? i mean, yeah, it's fast for batch, piping, and specific actions etc, but still, those are not the things of normal daily use. am i right?

    • @codewithsusan
      @codewithsusan 2 года назад

      What is TUI short for? Text User Interface?

  • @henryalferink1941
    @henryalferink1941 2 года назад +1

    5 years of being a Python coder, and never knew how much I needed this video

  • @BiancaAguglia
    @BiancaAguglia 4 года назад +5

    I have two questions:
    1. How do I copy and paste in bash?
    2. How do I scroll up and down in bash?
    Joking aside, I'm a complete newbie and those are the questions I would have definitely asked before having watched this video. I can now confidently say that the amount of silly questions I'll be asking in the future has decreased by two. 😀Thank you.

    • @mikem4520
      @mikem4520 2 года назад

      Still have more silly questions?

    • @Limp_Daddy
      @Limp_Daddy Год назад

      How do I store a fax on my hard drive?

  • @SolomonUcko
    @SolomonUcko 4 года назад +6

    4:25 Ctrl-Shift-C / Ctrl-Shift-V is also common AFAIK.

  • @user-mr8ij8gi7c
    @user-mr8ij8gi7c Год назад +3

    Quick Summary: Terminal, Bash, Comand Line, Prompt... different aspects of what you may be using at the same time.
    [1]: a TERMinal started out as the *Hardware* keyboard+display on your desk (with NO processing logic inside) that sent all keystrokes to a remote computer (where the thinking+CPU+programs run) and the computer would send text information back to be displayed for you. Like THIS VT100 terminal: en.wikipedia.org/wiki/VT100 For the last 30 years, this is usually a terminal *emulator* program that behaves the same way that an old terminal Used to... but no separate hardware.
    [2] BASH is a "shell" program that runs as soon as you login to unix/Linux, and tries to understand commands that you type, then figure out what you want the computer to do next. (often by finding another program you want to run) There are sever "shell" options: sh=Bourne-Shell, ksh=Korn-sheell, csh=C-shell, bash=bourne-again-shell, and more.
    [3] a COMMMAND Line represents the command/directions/request/instructions that YOU type into the computer's shell.
    [4] a PROMPT means that the computer is waiting for you to type something in to the computer from the keyboard. Prompt also refers to any short text message that the computer prints out (just before the cursor) to let you know what's going on, and what to type next.
    So... al lof these may be "active" at the same time when you are logged into a Linux computer.
    The terminal could be the "window frame" and background, that defines the frame, appearance, fonts, and general "canvas" for text information to be displayed on. Within that terminal environment, the computer may be running a bash "shell" that is displaying a prompt, and waiting for you to type a command line. After you type the command line and press enter, the shell reads that command line and tries to do what you want, or finds another program that will do that for you.
    If you want to change how things LOOK, for background/fonts, or scroll around, that is generally related to the Termianal's scope of responsibility.
    If you want to change how things BEHAVE, or your environment variables, or change your prompt, work with the Shell.
    If you want to automate things with a simple "shell script" program, then you will need to create a file full of shell commands using an editor like vi/vim and then tell the shell to run the commands in that file.
    Almost anything else requires running additional programs. (which the shell will help you find+run through $PATH directories)
    SO: That's a 30 second summary of this 11 minute video.

  • @MrHatoi
    @MrHatoi 4 года назад +4

    So, tell me Luke.
    How _do_ I change directories in st?

  • @blassap
    @blassap 3 года назад +2

    Hey there, love you're stuff. Just a small observation: Running /bin/sh happens alot when you are working in container land so POSIX compliancy has risen at least in my scripts ;)
    Edit: typo

  • @thingsiplay
    @thingsiplay 3 года назад +2

    "Don't say funny things…" - Luke Smith, 2019

  • @dannydan7376
    @dannydan7376 3 года назад +1

    Hi, very indulging video and thanks for identifying these major differences.

  • @mikowl5713
    @mikowl5713 4 года назад +9

    In short all of these different things are different.

  • @MayMay-nn8ux
    @MayMay-nn8ux Год назад

    This video was very helpful! Thank you!

  • @videogamesare1
    @videogamesare1 4 года назад +1

    Love your content. Big vim help when I was new to it.

  • @chaitanyashahare2734
    @chaitanyashahare2734 2 года назад

    finally understanding some basic things,thanks to you, it was great help

  • @cyberdr3am656
    @cyberdr3am656 4 года назад +1

    OH YES NEW VIDEO !!! Thx luke i learn a lot with you !

  • @francescocariaggi1145
    @francescocariaggi1145 4 года назад +13

    5:12 Hold on: if bash is a language, how can it have a setting to stop a running program? Were you referring to the bash interpreter perhaps?

    • @igorthelight
      @igorthelight 3 года назад +1

      You can kill a process in any language - here is an example for C:
      stackoverflow.com/questions/6501522/how-to-kill-a-child-process-by-the-parent-process

  • @ArniesTech
    @ArniesTech 2 года назад

    Actually...THANK you! I always wanted to change the prompt color schemes 🙏

  • @voiceoftreason1760
    @voiceoftreason1760 4 года назад +2

    It's also good to know about interactive vs non-interactive shells and login vs non-login shells

  • @mikel5049
    @mikel5049 3 года назад +1

    Wow great explanation Luke!

  • @juliannafotheringham7101
    @juliannafotheringham7101 2 года назад

    SO SO helpful thank you !!

  • @mamaharumi
    @mamaharumi 2 года назад

    Thanks man, not the target audience, but this helped me a lot. I just opened up a terminal for the first time in my life to copy/paste and patch a game on Linux. Really just wanted to know some basic terminology to research further and understand what exactly I was doing.

  • @draconar666
    @draconar666 3 года назад +2

    Hi, I loved this video. where can I find more information on how the shell interprets and execute commands? Specially the interface with the kernel.

  • @trijenhout
    @trijenhout 4 года назад +2

    thanks, i am a 15 year running (open)SUSE amateur...this video clears up a bit of the "pro mind set"...Thanks for the effort (Y)

  • @phellypefreitas5118
    @phellypefreitas5118 4 года назад +1

    Then what does it mean to run shell on emacs (M-x shell)? I'm really new to this and learning kind of randomly, so forgive me if this is a dumb question

  • @juliankeksel7812
    @juliankeksel7812 4 года назад

    Thanks for the Information Dr.Eggman

  • @ravenecho2410
    @ravenecho2410 7 месяцев назад

    Helpful a bit like parameter, argument and keyword arguments

  • @x1x2x125
    @x1x2x125 4 года назад +2

    How do u increase font size of the terminal?

  • @angelojulioth3616
    @angelojulioth3616 4 года назад +5

    Спасибо Ильич!

  • @dannggg
    @dannggg 2 года назад

    Thank god for this video. I’m taking an operating systems class and was confuse during lecture. 😂

  • @victorprokop2240
    @victorprokop2240 4 года назад +10

    Hey Luke, how do I change font size in bash????

  • @pika7037
    @pika7037 4 года назад +2

    Ladies and Gentlemen, Luke Smith is back in the game

  • @ryukthegodofdeath8063
    @ryukthegodofdeath8063 4 года назад +42

    Me thinking the last video was good.
    Luke: there is another
    EDIT: just realized that this comment was cringy as hell.

  • @neobandit9134
    @neobandit9134 2 года назад

    Thank you for this video. This is the answer to the questions I have.

  • @avimehenwal
    @avimehenwal 3 года назад +1

    Very informative video, learnt something good about shell promps today :) nice
    Are there any interactive shells available for javascript as well? Which one are you using? Whats so nice about it?
    Thanks in advance

  • @umndrk600
    @umndrk600 11 дней назад

    Thanks for informative video!!

  • @Luxcium
    @Luxcium 4 года назад

    I am confused about the stdin and stdout I was able to let’s say open 2 terminal windows in zsh (or bash etc) and (but I don’t remember how) run a command, like echo something > to/a/destination and it was echoing in the second terminal window... I am looking to get my understanding right about what is the difference between stdin/out vs. the name of each output and I am as much confused as those people mixing the prompt with terminal with bash... etc

  • @stefanvanbiljon8657
    @stefanvanbiljon8657 3 года назад

    This is exactly what i needed thank you

  • @JayKumar-mr2oh
    @JayKumar-mr2oh 2 года назад

    Epic battle!

  • @limitless1692
    @limitless1692 2 года назад

    Like :)
    Thank you, fun video to watch.
    I have a love/hate relationship with BASH...
    It is extremly powerfull but sometimes it drives me nuts..

  • @lordgains3317
    @lordgains3317 Год назад

    Im trying to learn tcsh. But bash is the language running in my shell. Is there a permanent way to make my shells tcsh?

  • @krimod
    @krimod 4 года назад +2

    Wtf did he just use a mouse at the start ??!!

  • @zuhail339
    @zuhail339 3 года назад

    I wish I could hit the subscribe button more than once . What a damn good vid

  • @iliyaivanov2095
    @iliyaivanov2095 4 года назад +1

    So how to copy from python and paste in bash or shell.

  • @easydesign7029
    @easydesign7029 3 года назад

    guys cmder find many problems in the windows. Is there a solution or is there a better one?

  • @sokoTV2
    @sokoTV2 4 года назад +1

    Thanks Luke. My confusion is being directed better now.

  • @misterx8934
    @misterx8934 4 года назад +15

    boomer uses zoomer shell 😱

  • @duresafeyisa5502
    @duresafeyisa5502 3 года назад

    I was really confused with the word like bash, shell, terminal emulator and other.... Thanks to you I get the point

  • @AnthonyAnalog
    @AnthonyAnalog 2 года назад

    Thank you for this.

  • @Vende-se
    @Vende-se 3 года назад

    your video dint solve my question that is what the diference between prompt and terminal, i tryed to run a command ssh root@domain and he dint reconize the command ssh

  • @nurakmaljalil2899
    @nurakmaljalil2899 4 года назад

    Thank you for this information Sir

  • @alexj0101
    @alexj0101 7 месяцев назад

    Nice, very helpful.

  • @TdTSimonBE
    @TdTSimonBE 4 года назад +1

    > Ctrl-C will not work in any kind of terminal emulator to copy things
    conhost.exe (cmd) does just this, and it's better too. Why would you want to stop your program when in visual mode?

  • @janlochman1985
    @janlochman1985 10 месяцев назад +1

    So what is the difference between a command line (interface) and a terminal emulator?

  • @comgamilwebranger
    @comgamilwebranger 6 месяцев назад

    This is a very good video .. good to know these terms

  • @edebalazs891
    @edebalazs891 4 года назад

    How do I copy/paste in bash?
    What I could have meant: I have a File, that I want to Copy using a bash command. How Can I do that?

  • @JuFF1989_FI
    @JuFF1989_FI Год назад

    "You secretly have something to learn you don't know about" got me :_D

  • @sayedchowdhury2543
    @sayedchowdhury2543 3 года назад

    You do not have to laugh at people not knowing things, but at least you gave them a chance to know it. Appreciate it

  • @galaxyanimal
    @galaxyanimal 4 года назад +2

    The terminal on tinycore has this behaviour, which I think comes from flwm, the window manager: highlight something with a right click to copy, then middle click to paste. That's really annoying. The mac terminal has probably the most intuitive copy-paste behavior because macs use the command key for keyboard shortcuts, so the terminal can just use the regular shortcuts.

  • @buckfush187
    @buckfush187 4 года назад +1

    Bash, zsh, the shell I would say , should be defined as "your environment" and the command line being "your non graphical interface"

  • @jamesrockford5145
    @jamesrockford5145 4 года назад +1

    How do I copy and paste in bash

  • @a_maxed_out_handle_of_30_chars
    @a_maxed_out_handle_of_30_chars 4 года назад +51

    The only useful boomer I've seen in my life

  • @Alkaris
    @Alkaris 4 года назад +1

    How do I scroll up and down in Bash? xD

  • @zenec_
    @zenec_ 2 года назад

    So the terminal that I open on my Linux is an emulator ?

  • @fahtfakcarl7695
    @fahtfakcarl7695 4 года назад

    Thank you!

  • @dominikklis6679
    @dominikklis6679 4 года назад

    Hi Luke, any updates on Latin books project?

  • @GauravSharma-ui4yd
    @GauravSharma-ui4yd 4 года назад

    From where I can get your terminal emulator?

  • @worldtreeboy8712
    @worldtreeboy8712 Год назад

    are window powershell and cmd considered as terminal emulator or shell?

  • @vanessaancken3756
    @vanessaancken3756 Год назад

    Thanks!

  • @galaxyanimal
    @galaxyanimal 4 года назад +1

    Tinycore linux uses /bin/sh as the default shell. It uses busybox, I believe, which gives a POSIX-compliant, but not bash-compatible shell, which has caused me headaches when running scripts that assume that /bin/sh is bash.

  • @altEFG
    @altEFG 4 года назад

    Another stupid question. How do I copy some text from above command line into command line? Let's say, I ran some program, it outputted some text, I want to copy part of that text and put as an argument to another program or something.

    • @altEFG
      @altEFG 4 года назад

      Nevermind, apparently, you can't, unless you're using Luke's build of ST.

  • @hhskladby1596
    @hhskladby1596 2 года назад

    I would say your terminal (emulator) decides which colors etc. you can use how in your PS1. Or is your zsh directly talking to your graphics chip?