Yes, please more videos on these UNIX/POSIX standards, whatever you call these.
@PinakiGupta82Appu3 жыл бұрын
Quite useful info. Most Linux beginners will find your video super helpful to understand the basics of Environment Variables whether they use the command line regularly or occasionally.
@littlepeon3 жыл бұрын
Random gives a number between 0-32767 as 32768 is notable in computer science for being the absolute value of the maximum value of a 16-bit signed integer.
@michaelhoefler51183 жыл бұрын
Or just the largest value of an unsigned 16-bit integer 🙃
@rcht95863 жыл бұрын
@@michaelhoefler5118 no, a 16 bit unsigned integer has values from 0 to 65535
@johanngambolputty53513 жыл бұрын
32767 = 2^15 - 1 = sum of 2^n from 0 to 14 inclusive. Silly question though, why don't they use an unsigned int? Since RANDOM output is always positive anyway
@sukhmandersingh43063 жыл бұрын
@@michaelhoefler5118 largest value of 16 bit *signed integer.
@michaelhoefler51183 жыл бұрын
@@rcht9586 yes! You are right. My bad!
@Phydoux21123 жыл бұрын
The PATH stuff was getting to me. I have been wanting to dig deeper into this but never did. Your short and sweet description on how to add paths was a Godsend!
@agustinranieri3 жыл бұрын
Daniel: echo $VAR The cooler Daniel: printenv VAR
@sukhmandersingh43063 жыл бұрын
It's the other way around. All the cool kids do echo $VAR.
@agustinranieri3 жыл бұрын
printenv's rarity makes it cooler (?)
@Not-THAT-ChrisPratt3 жыл бұрын
Great video! Thanks for the education. Like a script-kiddie, I was just copy/pasting the line: PATH="$HOME/Applications:$PATH" (changing "Applications" to whatever I needed to add) without fully understanding the simple syntax. Now I do. This means worlds to me! I also agree that a playlist of these UNIX/Linux/POSIX commands would be great to help find them all.
@supersoniqamanyi3075 Жыл бұрын
Title should be “Environment Variable for 8years olds…” it’s actually that CLEAR !!! Thanks, man.
@theamithsingh Жыл бұрын
love the explaination, why can't people keep videos nice and simple like this.
@miguelperezpal3 жыл бұрын
Awesome content DT cheers from Spain
@rafiahmed50173 жыл бұрын
Thank u. I thought installing arch would be really hard ; but your previous tutorial videos had really taught me a lot about that
@Paul_I_S3 жыл бұрын
Thx. for doing great job on this channel. Currently I'm migrating back to Linux. Currently I'm struggeling to set up my printer (ET-3750). But I guess it's just a matter of setting the right permissions or the right environment variables..... Your channel is doing a great job bringing me back up to speed!
@owendavidmalicsi59003 жыл бұрын
Wow DT. Your lighting is getting better and better
@nnywadd3 жыл бұрын
You're looking lean bro. Great video.
@mightGalaxyBlackhole Жыл бұрын
You are very good and decently detailed with you presentations. How many years will it take a newbie to get to your level?
@edbeckerich37373 жыл бұрын
I need this info in a cheat sheet, i forget it everytime i need it, as long as its in Bash, it never changes
@TrueDetectivePikachu3 жыл бұрын
@@fedup6127 or markdown, it's less verbose than html
@Gabifuertes3 жыл бұрын
@@TrueDetectivePikachu markdown is great for this purpose, and if you need it as html there's pandoc
@parthachattopadhyay21813 жыл бұрын
Hey DT, the range 32767 is int with size 2 (byte). So for a variable defined with integer size 2 can store -32768 to 32767. Thanks for the videos.
@RishiR3 жыл бұрын
THANK YOU!
@vintovkasnipera3 жыл бұрын
Just the video I was looking for! Thanks
@anikbiswasarnob3 жыл бұрын
Wow! your T-Shirt is so awesome 😃
@milutinke3 жыл бұрын
Hey DT! Can you make a playlist with ordered tutorials for absolute beginners at GNU/Linux? A playlist that would include an explanation about what is GNU/Linux, how it came to be, what is POSIX compliance, how it differs from other Unix-like systems, then the basics about the OS, basics of the bash shell, why FOSS matters, etc. You already have made a lot of videos about those topics, so you could make shorter versions, in which you could link to longer versions, or just link the existing ones in order. (Shorter because people these days have attention span on the level of a goldfish) A lot of people I know want to switch to GNU/Linux because now Proton supports GNU/Linux gaming, it would be neat to point them to a propper source where they would get proper and good knowledge about GNU/Linux and FOSS, instead of not knowing much and being sheep who distro hop because they do not know how to properly configure things, or think the wrong things about GNU/Linux.
@xrafter3 жыл бұрын
How dare you insult me with that " people these days have attention span of goldfish" Please say sorry
@anantgupta11883 жыл бұрын
I have can have a small attention span like a goldfish but when I am @Linux it can be as long as 3-4 hours
@call_me_Lloydy3 жыл бұрын
I keep on learning 😊
@Somabilbooks2 жыл бұрын
thank you Very Much
@AndersJackson3 жыл бұрын
Actually, Environment variables are defined in the process that run any program, not just Shells. And in Bash, and other Shells, there are variables in the Shell (Bash has both local and global variables in the Shell). Environment variables are the ones in the process. The Good thing is that Environment variables are copyed to the child process. Then the parent process can't change them for the child process. And No process can change any other process Environment variables. Not even the patents. MS Dos have global Environment variables, so any process can change any other programs Environment variables. Which is bad.
@killistan3 жыл бұрын
Isn't Dos basically single process though? I'd think that that would mitigate that problem pretty well... Unless future scripts don't initialize their variables properly.
@Jupiter__001_3 жыл бұрын
So DOS runs into a similar problem as if one were to attempt to use EMACS as an OS?
@PrashantSharma-ql4yb2 жыл бұрын
love the T-Shirt
@AcidiFy5743 жыл бұрын
How about videos about making POSIX compliant Scripts or POSIX compliance in general???
@Aleksandar01003 жыл бұрын
shellcheck
@zvezdan9563 жыл бұрын
he uses fish
@AcidiFy5743 жыл бұрын
@@zvezdan956 It's worth a shot
@IronLung-x7d5 ай бұрын
Cool T-shirt man, where buy??
@socvirnylestela58783 жыл бұрын
btw have u tried river? a tiling window manager for wayland?
@dwillingham3 жыл бұрын
Thanks!
@aer04493 жыл бұрын
That print on his T-shirt is of religious Goddess in Hinduism...
@GuyWhoChad3 жыл бұрын
hey dt!, i have a question, how can i make the dtos installer?, like when you launch dtos installer it is a GUI INSIDE TERMINAL LIKE NCURSES HOW CAN I DO THAT?
@xarisfil583 жыл бұрын
do you have any dotfiles for the specific qtile or something else I think window manger setup?
@gabrielbap13 жыл бұрын
Great video
@longhoacaophuc82933 жыл бұрын
Hey DT, how do you colourize your ls command?
@HontoNeet3 жыл бұрын
I believe his “ls” is actually an alias for the program “exa” which is an alternative to ls with more features
@le0nz3 жыл бұрын
Yup dt uses exa and the set ls as an aliaz
@longhoacaophuc82933 жыл бұрын
@@HontoNeet oh, thanks for the information!
@mikael57433 жыл бұрын
Thanks
@elys75633 жыл бұрын
Hey dt, have you heard of ‘darling’(it’s like wine for Macos)... Btw very informational video
@007arek3 жыл бұрын
Why if I put my envs in zprofile or zshenv system doesn't see they? For example sxhkd can't use it.
@PhilipHarwell3 жыл бұрын
Surprised it isn’t uid == 0, typically in programming, you need two = for equality check. Single = is for assigning value to a variable.
@xrafter3 жыл бұрын
You can use == with the shell built-in that starts with [[ and end with ]]>
@stephan65303 жыл бұрын
Bash accepts both '==' and '=' for string equality comparison. '=' is usually used with the 'test' command for POSIX conformance.
@shubham_srt2 жыл бұрын
thank youuuu
@Tn5421Me3 жыл бұрын
I just realized you have /home/dt/.local/bin in your path twice
@sourabhk23733 жыл бұрын
What is a Hindu Goddess doing on your t-shirt ? PS: Nice video!
@dhrubajitchakravarty543 жыл бұрын
Sir when is DTOS coming sir pls reply waiting for it eagerly
@SimGunther3 жыл бұрын
When it's ready
@peenywallie3 жыл бұрын
Why do Indians always say "sir"?
@Jupiter__001_3 жыл бұрын
@@peenywallie I suppose it must be good etiquette in their languages.
@tomoghnosen3 жыл бұрын
Is it goddess Kali maa in your tshirt
@anantgupta11883 жыл бұрын
I guess yes
@itdepends6043 жыл бұрын
can someone explain the difference between ~ and $HOME. When should you use one over the other?
@itdepends6043 жыл бұрын
@Obvious Honeypot what shell doesn't support ~?
@theodiscusgaming39093 жыл бұрын
use $HOME in scripts for better compatibility, and ~ in commands.
@boblol14653 жыл бұрын
do a video on hannah montana linux
@CyberDwarf19493 жыл бұрын
Niceee! 👏👏👏
@MaxHeroGamer3 жыл бұрын
32767 is the maximum number you can represent with 15 bits. I don't know why they used 15 bits for it, though.
@hughesd.mungus98193 жыл бұрын
it's the max of a signed 16 bit number so -32768 to 32767
@MaxHeroGamer3 жыл бұрын
@@hughesd.mungus9819 Oh it's signed...
@CreachterZ2 ай бұрын
Make those local scripts functions.
@kerodfresenbetgebremedhin18813 жыл бұрын
it is 32767 because it uses 16 bits to store
@punishr903 жыл бұрын
Thats a 'KALI' on his t-shirt
@praetorxyn3 жыл бұрын
It's a pity there's not a good "shell agnostic" way of setting global environment variables for things like XDG compliance... at least not when you include the fish shell in the criteria for "shell agnostic." I know you could edit .profile or /etc/profile or something... but the whole point of forcing XDG compliance is to get rid of things like .profile. I suppose you could set the default shell to bash and just have bash set the variables and launch fish, and I think the variables might persist to the fish session and your desktop environment... but eh. Such a hack.
@AndersJackson3 жыл бұрын
No, XGD are not about remove /etc/profile etc. It is about being able to use locale adjusted directories, like ~/Document is used in English locale and ~/Dukument in Swedish. And config files in ~/.config etc. Has nothing to do with Shell init files. You still need Them That is what the environmen
@praetorxyn3 жыл бұрын
@@AndersJackson I never said it was supposed to get rid of anything in /etc... but /etc is beyond the scope of user configuration, so changes there can't easily be stored in a dotfiles repo. You literally just said XDG is so that user configuration goes in ~/.config. ~/.profile, ~/.vim, ~/.ssh, etc literally all violate this. It should be ~/.config/profile, ~/.config/vim, ~/.config/ssh, etc. fish is the only shell that respects XDG (though you can sort of force zsh to do so by setting ZPROFILE early enough... though you'd probably need to face the same sort of conundrum to do so.
@kapellimestari00783 жыл бұрын
Hello, i just watched you video about irssi, and do you know some chat program like this one? but safety and privacy... Or batter, maybe could you teach how create a chat between two computer? wait, a better topic, if you know could you please make a video about cryptography, and the asymmetric cryptography, and the most important, how to apply the asymmetric, because for example , I know about it, but I don't really know how to use it, how to implement and so on and so forth. Or maybe anyone who is reading this comment could please send me a video or a site or a book about it please
@Paul_I_S3 жыл бұрын
👍
@plasmalife55323 жыл бұрын
Difference between $HOME AND ~/ ??
@xrafter3 жыл бұрын
same thing in the man page of ls or something idr, "~" is almost always $HOME .
@killistan3 жыл бұрын
do this in a shell to get a behavioral idea: echo ~ echo "~" echo $HOME echo "$HOME" basically, $HOME is a variable, ~ is something more like a glob (It's not technically a glob). You'll notice that when quoted, the variable is expanded, but ~ is not.
@xrafter3 жыл бұрын
@@killistan Wow i just try it and it blew my mind . ~ is rigged .
@killistan3 жыл бұрын
@@xrafter Yeah, almost always use $HOME in scripts, but who wants to type that in the command line all the time?
@plasmalife55323 жыл бұрын
Thanks to everyone
@chiranjeevinaidu36603 жыл бұрын
Bro can you make a video on how we can setup our own cross platform terminal that can run all the commands of bash and cmd it will be really cool if you could make a video on this topic.
You have an extra /home/dt/.local/bin in your $PATH just fyi...
@billfarley90153 жыл бұрын
I don't have mouseface. not in repo. I found it in Github. Can someone please tell me the command to download it. The Github-clueless among us would appreciate it. I do have fortune though. The first time I tried it I got this : Q: How many existentialists does it take to screw in a light bulb? A: Two. One to screw it in and one to observe how the light bulb itself symbolizes a single incandescent beacon of reality in a netherworld of endless absurdity reaching out to a maudlin cosmos of nothingness.
@neuzen3 жыл бұрын
BTW I use fish
@send2gl3 жыл бұрын
Why would someone use a sub shell?
@Gabifuertes3 жыл бұрын
Try fish and you'll be invoking bash for opening scripts or just out of frustration
@send2gl3 жыл бұрын
@@Gabifuertes I can understand an alternative terminal but can't quite get why someone would use a terminal to open another terminal. Unless of course there are circumstances (of which I am not aware) whereby one terminal is preferable to another.
@arkvsi81423 жыл бұрын
I use MS DOS
@leviticus89303 жыл бұрын
First?
@ignisimmensus25683 жыл бұрын
Can you please use timestamps on your videos? thanks
@dkosmari3 жыл бұрын
I'm gonna try to offer some constructive criticism, since I feel like this was of lower quality than, say, your org-mode videos. One mistake you're making here is trying to reword and rename concepts, to the point of being technically wrong. For instance, your usage of "local" vs "global" variables doesn't match what is actually local vs global variables in shell scripting. You meant "variables" vs "environment variables", because that's what Bash (and POSIX) names them. Questions that I think should have been answered in the video: - What is a variable? - What is the environment? - How do you add, change or remove a variable in the environment? - How do you modify the environment only for the child process? - What are the standard ways to persistently customize the environment? That last one is the single most useful information for people that don't want to dive into shell programming, yet you devoted the least amount of time to it. - "Why does my PATH have the same location twice?" - "Why does my shell see the variable, but the script I invoke doesn't?" - "Why isn't ~/.config/environment.d working is the documentation says it should work?" (Spoiler: because systemd.)
@plasmalife55323 жыл бұрын
Are you supporting hindu religion 🤔 (t-shirts)
@vintovkasnipera3 жыл бұрын
doesn't necessarily mean so
@anantgupta11883 жыл бұрын
not sure but in one video he says that he read holy books of many religions like the bible, Quran, Bhagavad Gita If anyone notices that he also have lord buddha statute
@Waffelo3 жыл бұрын
Waffelo
@MrTAL693 жыл бұрын
Sorry DT but there are actual definitions for concepts of local and global variable, and that's not it. Since you're being (for a good reason!) followed by total newbies, you really shouldn't be playing it fast and loose. Oher people may at a later point need to un-teach incorrect concepts before they can learn correct ones; and that's a bi*ch job.