Тёмный

Bash Scripting for Beginners: Complete Guide to Getting Started - Where to Store Scripts (Part 10) 

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

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

 

22 окт 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 28   
@yuzhu2547
@yuzhu2547 Год назад
Finally I know what's `/usr/local/bin` and how to properly use it. Thank you, Jay.
@Miguel_GM
@Miguel_GM Год назад
I usually have my scripts on a folder in my home directory, and then to make them executable from anywhere I just create a symbolic link to the script in a path folder. Cheers!
@jojobobbubble5688
@jojobobbubble5688 Год назад
And I finally understand how to add permanent scripts to the terminal! Thanks Jay!!
@Theborg72
@Theborg72 Год назад
Love this serie but would be handy if you also added the link in description to the wiki page you ran
@jiasonghuang3602
@jiasonghuang3602 Год назад
I’m not sure if i heard it wrong or it’s an honest mistake. But usr stands for Unix system resources instead of user. Very informative video tho!
@noweare1
@noweare1 Год назад
Just make sure to backup usr/local/bin if you upgrade your linux version. Also, i think using the export command that way only changes your path for that session.
@emanuelwieland
@emanuelwieland Год назад
I really like your videos and would like to thank you for all your work. In this video a small carelessness has crept in, to which I would like to draw attention briefly. At minute 6 after ls -l /usr/locacl/bin you see the following output: "-rwxrwxr-x" (775) However, it would be better and above all safer to set the permissions as follows: "-rwxrwxr--" (774) This way only root or root privileged user can execute this command. Hope this helps. Thanks again for your wonderful work. - Big THANK YOU!
@MrWaschbrettbaer
@MrWaschbrettbaer Год назад
Your solution seems indeed cleaner since others have no business executing the command. But could a non-privileged user actually execute this script even though it contains sudo commands? Very late reply, but would be very curious since I am just starting to get into this stuff.
@maxbilo6191
@maxbilo6191 Год назад
Just amazing pedagogy. Thank you sooooo much!
@doxdorian5363
@doxdorian5363 Год назад
Incredibly useful. Thanks a lot.
@busdriver1261
@busdriver1261 Год назад
I use ~/.local/bin/ for my scripts mainly because it is added to the $PATH (if present) via the .profile file (it also looks for ~/bin/ directory as well). This works for me as I have a single user system, however I would use /usr/bin/ as Jay suggests to make it system wide if I had more that one user.
@eilayyosfan4417
@eilayyosfan4417 3 месяца назад
thank you
@subee128
@subee128 8 месяцев назад
Thanks
@JohnBortins
@JohnBortins Год назад
Outstanding!
@zeppelinmexicano
@zeppelinmexicano 8 месяцев назад
Does "export" to reconfigure the $PATH work only in that shell? I think so but I can't test it at the moment. Seems to me that we need a script that sets $PATH whenever we open a new shell.
@cpatra2696
@cpatra2696 7 месяцев назад
You need to do it in actually vi in the path, and not used export
@DannyRoberts-u6l
@DannyRoberts-u6l 4 месяца назад
What desktop system do you have? I don't know why but I want that background and green glowy border very badly 😂
@Mugen_FB317
@Mugen_FB317 4 месяца назад
It's edited for video purposes. 🤣
@chandrachurmukherjeejucse5816
Great lecture sir.
@treyquattro
@treyquattro Год назад
I mostly keep my scripts in /home/$USER/scripts or /home/$USER/.local/bin because mostly it's just me using them; the .local/bin directory is in my $PATH but scripts is not. I find the Linux Filesystem Hierarchy Standard a little confusing, or maybe it's confused (even that's confusing). You're not supposed to create directories off the root, but the standard Linux directories seem liable to be not updated properly if you e.g. have to reinstall or you have a new installation. On Windows every app goes under the Program Files directory and e.g. Windows and Windows\System32 is not (usually these days) updated with user or application binaries. On Linux you have a plethora of directories under /usr and there's also the /opt directory if you're installing an application, maybe. Some apps install themselves there, some go in various directories under /usr. It doesn't seem like there are hard and fast rules as to what goes where, and I know that files go in slightly different locations on different distros which makes it even more confusing! If you're a developer with several users on a machine and you want to share source and include files for example, where are you supposed to put them? Include files probably go under /usr/include. but you don't really want to put them there because that's a distro-created directory that contains files specific to the C compiler. You could create a subdirectory but of course that won't be migrated to a new system without manual copies. Source files probably go somewhere under /usr/share or /usr/src or maybe it's /var. I really find it difficult to know where files should go that won't interfere with system/distro-provided files, and which won't get clobbered or left out on a system upgrade or migration. These days I'm considering putting my source and includes in containers and accessing them via HTTP or SMB e.g. (or NFS if I can ever figure it out). That won't answer my questions regarding directory hierarchy, but will make migration more straighforward, in theory.
@noweare1
@noweare1 Год назад
Linux file system confuses me too. I use opt a lot as it seems not much used by the system but is out of my home directory
@lk_8585
@lk_8585 Год назад
wow really nice content
@guilherme5094
@guilherme5094 Год назад
👍Nice.
@tinacole1450
@tinacole1450 11 месяцев назад
got root: illegal group name error
@Alpha_Sadigh
@Alpha_Sadigh Год назад
☯🙏
@Roje8
@Roje8 2 месяца назад
This video is 1337 .... I mean length ;)
@ibrahimmorketa2093
@ibrahimmorketa2093 Год назад
please, Sir! answer my question
@tobaakanbi7879
@tobaakanbi7879 Месяц назад
the shop linux tv store is blocking the LIKE button
Далее
Linux New User Guide: 10 Things I Wish I Knew
23:31
Просмотров 470 тыс.
How A Steam Bug Deleted Someone’s Entire PC
11:49
5 Common Mistakes New Linux Users Often Make
11:49
Просмотров 125 тыс.
Write Your Own Bash Scripts for Automation [Tutorial]
16:35
BASH scripting will change your life
14:18
Просмотров 1 млн