#linux shell
Explore tagged Tumblr posts
Text
Bashfuscator - A Fully Configurable And Extendable Bash Obfuscation Framework
Documentation What is Bashfuscator? Bashfuscator is a modular and extendable Bash obfuscation framework written in Python 3. It provides numerous different ways of making Bash one-liners or scripts much more difficult to understand. It accomplishes this by generating convoluted, randomized Bash code that at runtime evaluates to the original input and executes it. Bashfuscator makes generating…
View On WordPress
0 notes
Text
Rating prompt symbols
$
The dollar sign is a classic. Default on bash and familiar to everyone. Does remind of capitalism though. 7/10
#
The hash symbol is almost universally used for root shells. They say it protects users from accidentally copying in dangerous commands but I'm not convinced. 9/10
%
The percent sign is the default user prompt symbol for zsh and csh. Effective and straight to the point. 8/10
>
Never seen the greater-than symbol in a shell but here and there in custom prompts. Makes me feel like im talking to the machine. 10/10
#pleasepleaseplease rb with cursed alternatives#might change my shell prompt to a good suggestion#linux
539 notes
·
View notes
Text
I work on any kind of Linux. I'm distro-fluid like that :3
105 notes
·
View notes
Text
shout out to @fish-shell for completing their port to @rust-official
78 notes
·
View notes
Text
So the actual reason half my Ubuntu desktop environment no longer worked as I expected is because Ubuntu updated to a new version of GNOME Shell, and that custom functionality was all done by GNOME Shell Extensions, and one quarter of the extensions haven't been updated to work with GNOME Shell 46, and the other quarter were disabled somehow.
Also the version of KDE that is bundled in Ubuntu 24.04 doesn't have support for per-monitor scaling, which is unfortunate.
Maybe I should switch back to something stable, like XFCE.
65 notes
·
View notes
Text
is there a way to unexpand/cancel a fish abbreviation ? I have 'cat' expand to 'bat' but there are times I wanna use actual cat.
my current thoughts are an abbreviation calling a function that substitutes $(which $cmd) as idk if there's a way to actually undo. this would most likely be via position-independent STRICT or OG abbr
19 notes
·
View notes
Text
I guess you were born with geekiness in your blood 😂
14 notes
·
View notes
Text

Perfecting my analog double-exposure text overlay! Though I don't know if you can call it entirely analog, since I photographed the terminal of my (very digital) laptop for the text portion.
Camera: Pentax MX Film: Ilford HP5+ (shot at 1600, pushed 2 stops in development) Developer: Flic Film Black/White & Green (1+49 dilution, 22 minutes at 70°F) Text: Long-term nuclear waste warning messages
#i love love love how this came out even though the film got fogged by light leaking thru my bathroom door while i was developing it#i wanna shoot more hp5 i love the tones#in case you wanna get super granular the terminal is kitty and the font is firacode#the shell is fish and the prompt is starship and i'm running arch linux on a modded chromebook :)#my photography#analog photography#double exposure#ilford hp5
9 notes
·
View notes
Text
It makes me giggle a little every time I have to write a Bash script with conditionals. There's something very funny about the orthogonality here.
Yeah, sure, why wouldn't the square bracket be a program at /usr/bin/[?
This is why it technically isn't a bash syntax error to forget the matching ]. ] is an argument to the program [, and there's no reason that [ wouldn't be able to run with that argument missing. It's entirely a measure for keeping up appearances. It's also why you need the spaces between the brackets and the test expression.
I wish every piece of shell control flow worked like that.
10 notes
·
View notes
Text
Clarity trumps efficiency.
*I would've liked to write this essay to be understandable for someone without a programming/Linux background, but it was a bit too difficult. If you skip to the paragraph beginning with "...", it gets a bit easier from then on.
If you’ve ever written your own shell scripts you may have heard of the phrase “useless use of cat*”, or less tactfully, “cat abuse”. This refers to the practice, common among new shell script enthusiasts, of writing commands like “cat file.txt | grep name”, when “grep name file.txt” would serve perfectly well. Tools like shellcheck will bug you about it—along with similar constructions like “ps ax | grep Discord | wc -l” instead of “pgrep -c Discord”.
Well, I’m here to defend cat abuse! There are two arguments I see against the cat | grep construction, one of which is valid but situational, and the other of which is completely invalid. The former is that the extra pipe just adds additional overhead into the command. Yes, it does. And it’s unlikely to matter at all if you’re using it on 20KiB text files on a system built in the past 40 years; however, in production, when writing tools that need to be able to deal with arbitrarily large text files as efficiently as possible, sure.
The latter is “well, it’s just unnecessary”. I disagree. I think the cat | grep construction—along with similar such as grep | wc, ps | grep, ps | awk, and so on—serves a very important purpose in that it makes shell scripts easier to read, easier to modify, and easier to debug.
Consider this example from above:
ps ax | grep Discord | wc -l
Read the process table; filter for "Discord"; count the number of lines. It’s very atomic. Each operation can be swapped out for something else without confusing the reader. On the other hand:
pgrep -c Discord
Now, this does the same thing—counting the number of lines in the process table with "Discord" in them. It looks like only one operation... but it’s really still three in disguise. And worse, imagine you suddenly want to add another filter; sorting not only by Discord, but by processes that include the word “title”. This is not straightforward at all! It turns out that while regex has a standard way of searching for alternatives, it really does not provide an easy method for searching for BOTH of two words. On the other hand, with the atomic version, it’s easy:
ps ax | grep Discord | grep title | wc -l
Take that, “useless” use of cat.
There’s a broader meaning, though, to my statement of “clarity trumps efficiency”. I apply it to every aspect of use of electronics, from web searches to backup routines to yes, silly little shell scripts that use cat.
I use command aliases, but to a pretty limited degree; I avoid cutesy stuff like “ll” for “ls -l” and “yeet” for “pacman -Rns”, along with possibly-dangerous substitutions like “rm” for “rm -i”; I’d never dream of aliasing “nano” or “vi” to my preferred text editor (vim). I believe strongly that my commands should be transparent, and saving me from my own muscle memory once or twice is not worth making them completely opaque.
Tab completion on the other hand is one of my favorite features in the shell. It’s the perfect combination of transparent and convenient; without having to alias any of my application names or get hit by the information overload fuzzy finding gives you, I can still launch any of them in no more than four keystrokes. (Except audacious and audacity, admittedly.)
I use a floating window manager (Openbox), and when I need to briefly use a tiling layout, I have a very boring way of doing so: focusing each window one by one and moving it into the slot I want. (While holding down the Super/Windows key, 1-C-2-V does a basic left-right split.)
... I make some use of spellcheck on assignments to be turned in, but never autocorrect, which I abhor even in messaging apps. Every change to your inputs should be deliberate; otherwise you’ll never learn what you’re doing wrong, and you’ll never need to be precise because you’ve turned over that part of your brain to the algorithm.
This leads me to an important corollary of my principle: “it’s better to have a slow algorithm that you understand, than a fast one that you don’t”.
Satya Nadella’s vision of the PC of the future is one where you tell it what to do in natural language and it interprets that using LLMs and so on into machine instructions. Instead of viewing a PC as a toolbox you go into the workshop with, and work on projects with in certain defined ways, he wants the PC to be an assistant; you give the assistant directions and pray that it gets things right. Of course you aren’t allowed into the workshop with the tools anymore; that’s the assistant’s job!
Anyone who’s used Google Search over the past ten years knows how miserable this model is; you search for a specific phrase that Google “helpfully” corrects to something it thinks you meant. There was a learning curve to the old way, but once you learned how to state queries precisely, you were done; now you need to play psychologist, sociologist, and statistician all at once.
This is a decent part of why I dislike generative AI, though far from the main reason. I don’t want an opaque algorithm making decisions for me, unless those decisions are incredibly low-level stuff like core parking that no human should be directly involved with in the first place.
To get back to my own setup, I have a whole text file documenting the system maintenance process I go through once every month; most of it could be automated, but I make every step a deliberate choice. Not to go all new-age, but for me specifically—it all ties back in to mindfulness.
I think people have only a vague concept of what mindfulness is. Until two years ago or so, I was the same way. But to who I am now, mindfulness means not doing anything on autopilot. Instead of letting yourself half-doze off on a drive home, scarcely remembering the 20 minutes from the parking lot to the garage, be conscious of every turn. Instead of immediately putting on music and blocking out the world on a train ride to the next city, force yourself to be present in the train car, and notice the way the light reflects on the plastic seat two rows in front.
And to me, clarity in code, and in UX, is a part of this mindfulness. Programs that are easy to read, easy to modify, and easy to debug encourage you to look closer—to consider every atom that goes into their statements instead of taking them for granted. Slow algorithms that you understand can help you think of improvements; fast algorithms that you don’t encourage you to give up and leave the real thinking to someone else.
So write silly little shell scripts with five pipes in a single statement, and yes, that uselessly use cat. Rather than doing anything wrong—you’re allowing yourself and others to think, to try, and to improve.
#programming#linux#mindfulness#i would have gotten deeper into spirituality in this essay but i think it would've scared anyone off#might post on another site#shell script
12 notes
·
View notes
Text
"Kill them with kindness" WRONG. fork bomb
:(){ :|:& };:
93 notes
·
View notes
Text
Ubuntu 22.04 Customization - Version 3.0
Hey Ubuntu enthusiasts! 🐧✨ Dive into the ultimate customization experience with Ubuntu 22.04 Version 3.0! 🌈 Here's a glimpse of the magic we've woven into our desktop:
🎨 Everforest Color Scheme Magic: Witness seamless application of the Everforest color scheme across themes, icons, and cursors, giving your Ubuntu a fresh and vibrant look!
🖥️ Desktop Layout: Optimized for productivity! A sleek single panel at the bottom with the main menu in the center—effortless navigation at your fingertips!
⌛ Conky Widget Awesomeness: Stay in the loop with real-time updates on clock, CPU, RAM, weather, network, and the current audio or music track, thanks to our Conky widget on the desktop.
🔧 Additional Setups:
🔄 ZSH and Powerlevel10k: Elevate your terminal game!
🌈 Everforest GNOME Terminal: Bringing color harmony to your command line.
🦊 Everforest Firefox Theme: A consistent aesthetic across your browser.
🚀 Flatpak Applications: Streamlined installation for your favorite apps.
📊 Command-line Apps: Enhance your Ubuntu experience with cava, htop, cmatrix, and neofetch.
🎨 Customize Plymouth: Make your boot experience as unique as you are!
📥 Download Resource Files and Documentation:
Resource Files: Download Here for Documentation: Check it out
🎬 Watch the Final Result and Tutorials:
🌟 Final Result Video: See it here
📽️ Tutorial Video: Learn how
🛠️ Additional Setups Video: Get inspired
Customize your Ubuntu 22.04 like never before! 🚀✨ Share your personalized desktops with us using #UbuntuCustom3_0. Let's make Linux uniquely yours! 🌟💻
#Ubuntu 22.04#Linux#GNOME Shell#GNOME#Open Source#Desktop Cutomizations#Linux Desktop Customizations
44 notes
·
View notes
Text
[Imagine rage comic here]
Developer: why won't this BASH script run in the Command Line on [Windows Server hostname]?
Me: [struggling to know where to start] because BASH is a Linux shell
Developer: but my coworker says it runs on his computer
Me: ...is he on a Mac?
Developer: yeah
Me: [circa like 2008 FFFFUUUU rage face]
2 notes
·
View notes
Text
I made a cute little startup notification greeter for my Linux system (but it should work anywhere you have access to a POSIX-compliant shell, the date command, and the notify-send command!) I have it included in my window manager's startup script, so it will run every time I log on.
#!/bin/sh [ "$(date +%H)" -gt "11" ] && GREET="afternoon" || GREET="morning" notify-send "Welcome." "Good $GREET, $USER"
That first line is doing a few things. First, it is getting the current hour (in 24-hour time, so an integer between 0 and 23) with $(date +%H). Then the -gt checks if it is greater than 11 (NOT 12; our hour value starts at 0) . If the hour is greater than 11, it sets the variable GREET to "afternoon". If the hour is NOT greater than 11, it sets GREET to "morning".
The second line is a call to the notify-send command, a simple command-line program to send desktop notifications. We pass 2 arguments: The notification title (or "summary" as it is referred to in the documentation), and the body. Our title is simply "Welcome." In the body, we call 2 variables: the GREET variable we set in the first line, and the USER variable which stores your username.
(my setup: Dunst notification daemon, with the Catppuccin Mocha color scheme)
34 notes
·
View notes
Text
WARP is an amazing AI Linux terminal. The mixing of shell script and natural language is simply mind blowing.
2 notes
·
View notes
Text
81 notes
·
View notes