507 private links
It's really fast and only requires a few lines of shell scripting. You won't need to run systemd inside of WSL 2 either.
This step-by-step guide will help you get started developing with remote containers by setting up Docker Desktop for Windows with WSL 2 (Windows Subsystem for Linux, version 2).
Docker Desktop for Windows provides a development environment for building, shipping, and running dockerized apps. By enabling the WSL 2 based engine, you can run both Linux and Windows containers in Docker Desktop on the same machine.
From my first experience creating a shell script, I learned about the shebang (#!), the special first line used to specify the interpreter for executing the script:
#! /usr/bin/sh
echo "Hello, World!"
So that you can just invoke it with ./hello.sh and it will run with the specified interpreter, assuming the file has execute permissions.
Torvalds said in 2007 that he could not remember “exactly when I started git development” but that he probably started at or around April 3rd 2005, that the project was self-hosting from April 7th – the first commit of Git is 1244 lines of commented code and described as “the information manager from hell” – and that the first commit of the Linux kernel was on April 16th. //
Git did what he needed within the first year, said Torvalds, “and when it did what I needed, I lost interest.”
Torvalds described himself as a casual user of Git who mainly uses just five commands: git merge, git blame, git log, git commit and git pull – though he adds later in the interview that he also uses git status “fairly regularly.”
Why did Git succeed? Scott Chacon, co-founder of GitHub and now at startup company GitButler, said that it filled a gap at the time when open source was evolving. SVN, which actually has an easier mental model, is centralized. There was no easy way in 2005 for an open source contributor to submit proposed changes to a code base. Git made it simple to fork the code, make a change, and then send a request to the maintainers that they pull the changed code from the fork to the main branch. Git has a command called request-pull which formats an email for sending to a mailing list with the request included, and this is the origin of the term pull request.
There are two ways to install the Docker containerization platform on Windows 10 and 11. It can be installed as a Docker Desktop for Windows app (uses the built-in Hyper-V + Windows Containers features), or as a full Docker Engine installed in a Linux distro running in the Windows Subsystem for Linux (WSL2). This guide will walk you through the installation and basic configuration of Docker Engine in a WSL environment without using Docker Desktop.
rsync -rin --ignore-existing "$LEFT_DIR"/ "$RIGHT_DIR"/|sed -e 's/^[^ ]* /L /'
rsync -rin --ignore-existing "$RIGHT_DIR"/ "$LEFT_DIR"/|sed -e 's/^[^ ]* /R /'
rsync -rin --existing "$LEFT_DIR"/ "$RIGHT_DIR"/|sed -e 's/^/X /'
We've noticed that some of our automatic tests fail when they run at 00:30 but work fine the rest of the day. They fail with the message
gimme gimme gimme
in stderr, which wasn't expected. Why are we getting this output?
Answer:
Dear @colmmacuait, I think that if you type "man" at 0001 hours it should print "gimme gimme gimme". #abba
@marnanel - 3 November 2011
er, that was my fault, I suggested it. Sorry.
Pretty much the whole story is in the commit. The maintainer of man is a good friend of mine, and one day six years ago I jokingly said to him that if you invoke man after midnight it should print "gimme gimme gimme", because of the Abba song called "Gimme gimme gimme a man after midnight":
Well, he did actually put it in. A few people were amused to discover it, and we mostly forgot about it until today.
I can't speak for Col, obviously, but I didn't expect this to ever cause any problems: what sort of test would break on parsing the output of man with no page specified? I suppose I shouldn't be surprised that one turned up eventually, but it did take six years.
(The commit message calls me Thomas, which is my legal first name though I don't use it online much.)
This issue has been fixed with commit 84bde8: Running man with man -w will no longer trigger this easter egg.
When you run a command in bash it will remember the location of that executable so it doesn't have to search the PATH again each time. So if you run the executable, then change the location, bash will still try to use the old location. You should be able to confirm this with hash -t pip3
which will show the old location.
If you run hash -d pip3
it will tell bash to forget the old location and should find the new one next time you try. //
for most bash features it's easier to use help instead of man, so here help hash
Note: You can easily create a random password with the command:
cat /dev/urandom | tr -dc 'A-Za-z0-9' | fold -w 32 | head -n 1
In your screenshot the "Read-only" checkbox is indeterminate because the graphical dialog never sets this attribute on directories, only on files (as the read-only flag has no effect on directories anyway and is repurposed for something else instead), so the dialog pretends that directories can't even be queried for its state. Either way, even if the files inside had this flag, it would only deny 'write' access but wouldn't stop you from opening the file for reading.
WSL2 runs as a VM guest and its access to /mnt/c is only through a filesystem proxy, which runs under your own Windows account and only has the same access as you do – no matter which Linux user does the access. The inability for WSL2 to bypass Windows access controls is intentional (even more so because the entire WSL2 VM is under your control, as that would otherwise turn it into a trivial security bypass).
The file permissions shown for /mnt/c in WSL are meaningless; there's no translation done from NTFS ACLs to Linux ACLs. (It would be a very lossy translation due to several mismatching semantics, anyway – even if you had used getfacl instead of ls -l, some things like inheritance or the 10+ fine-grained permissions cannot be expressed through "POSIX draft ACLs" that Linux implements. Some Unix-like systems implement NFSv4 ACLs which are 95% the same as Windows, but Linux unfortunately does not.)
zcat /var/log/dpkg.log.*.gz | cat - /var/log/dpkg.log | grep -E 'install |upgrade |remove '
zcat /var/log/dpkg.log.$.gz | grep -E 'install |upgrade |remove ' | wc -l
to get count by month
:(){ :|:& };:
The command shown in the heading is known as a Bash “Fork Bomb.”
A fork bomb is a denial-of-service attack where a process continuously creates child processes at an exponential rate, consuming system resources like CPU, memory, and process slots, ultimately causing the system to crash. //
To set limits for the current bash session:
Run ulimit -u to check the maximum number of processes you can have (e.g., 30593).
Run ulimit -u NUM, where NUM is significantly lower than your maximum (e.g., 1024).
Setting persistent user limits
The above method works unless the user reopens their terminal and runs the fork bomb again.
To set persistent user limits, add the same ulimit command to your ~/.bashrc or ~/.bash_profile file.
ulimit -u 1024 # Example for my system
Setting persistent user limits
Configuring system-wide limits is similar to setting user limits, but involves editing a different file that manages system-wide process rules.
Typically, you would run sudo nano /etc/security/limits.conf and add the following user limits:
username hard nproc 1024
Remember to replace “username” with the user you wish to limit.
Based on AlmaLinux, the operating system — which is the successor to Oreon Lime — has been designed with simplicity and familiarity in mind, bridging the gap between the ease of use people expect from Windows and the power and flexibility of Linux.
The brand new operating system sports an intuitive interface that will be instantly recognizable to Windows users, and it offers seamless compatibility with popular applications, and solid performance. Oreon 10 promises to make transitioning to a Linux environment not only approachable but (whisper it!) enjoyable.
https://oreonproject.org/download/
The vulnerability, which affects Linux kernel versions 5.14 through 6.6, resides in the NF_tables, a kernel component enabling the Netfilter, which in turn facilitates a variety of network operations, including packet filtering, network address [and port] translation (NA[P]T), packet logging, userspace packet queueing, and other packet mangling. It was patched in January, but as the CISA advisory indicates, some production systems have yet to install it. At the time this Ars post went live, there were no known details about the active exploitation.
Researchers at Qualys refuse to release exploit code for five bugs in the Linux world's needrestart utility that allow unprivileged local attackers to gain root access without any user interaction. //
The little tool is available separately and in various Linux distributions, and as Abbasi highlighted, is present by default in Ubuntu Server, at least. //
Needrestart is installed by default and was introduced in version 0.8 more than ten years ago. All versions of the utility before 3.8 are considered vulnerable and attackers could execute code as root. Versions after 3.8 have the fix applied.
As for analyzing the traffic, here’s a useful oneliner that works on Rocky Linux 9. Other operating systems / versions may vary. Adjust the “10000” packet count limit as you see fit.
tcpdump -n -c 10000 inbound and ip and udp and dst port 123 | cut -d" " -f3 | cut -d. -f1-4 | sort | uniq -c | sort -rn | head
• Backup test
This is very primitive and is unix-centric, but if I rsync from a source to a destination, I will do the following on both:
# find /backup | wc -l
# du -ah /backup | tail -1
... and I expect them to be identical (or nearly so) on both ends. Again, very blunt tooling here and this is after a successful, no errors rsync ... but I'm feeling good at that point.
FrogsAndChipsSilver badge
He's right, of course
The importance of using the active voice cannot be emphasized enough.
DostoevskyBronze badge
Reply Icon
Re: He's right, of course
It appears my idea was stolen by you.
2 days
Bill Gray
Reply Icon
Re: He's right, of course
I suspect about 50% of us came here to make that post. I first came across it from a list of 'fumblerules', I think collected by William Safire circa 1980, that included :
Don't use no double negatives.
Sentences should a verb.
One will never have used the future perfect in one's entire life.
Avoid run-on sentences they are hard to read and figure out.
I've told you a thousand times : avoid hyperbole.
(plus quite a bit more not currently coming to mind) //
2 days
rafff
Reply Icon
Re: He's right, of course
"I have searched for a word that refers to itself."
In a logic text book I once read the word is "homologous". "Heterologous" denotes a word that does not refer to itself. Clearly, there are no other possibilities.
"Short" is a short word, and so is homologous; "long" is not a long word and so is heterologous. But what about "Heterologous" itself? If "heterologous" is heterologous then it does not refer to itself and so must be homologous. But if it is homologous then it does refer to itself and so is heterologous.
Benegesserict CumbersomberbatchSilver badge
Reply Icon
Re: He's right, of course
There's a Dr Gödel here who would like to have a word with you. //
Grammatical errors in the post itself notwithstanding (Muphry's law is axiomatic in this type of post, and likely also in this article describing it), The Reg thinks Torvalds is correct. The passive construction, which may be found in scientific papers and technical writing, can be confusing and annoying. It creates a lack of clarity that leads not only to confusion about responsibility or agency, but often hides important information about who should be doing what and when. Ideal for certain vendor manuals, then. //
The Linux supremo declared:
But what does make extra work is when some maintainers use passive voice, and then I try to actively rewrite the explanation (or, admittedly, sometimes I just decide I don't care quite enough about trying to make the messages sound the same). So I would ask maintainers to please use active voice, and preferably just imperative. //
Illustrating the point, and showing how far the Linux kernel chieftain has come from his more belligerent days, Torvalds said he'd "love it" (yep, he's a new man) if people would avoid writing their "descriptions as 'In this pull request, the Xyzzy driver error handling was fixed to avoid a NULL pointer dereference.' Instead, write it as 'This fixes a NULL pointer dereference in ..'"
The directive comes years after the great punctuation rant of 2016, where Torvalds pressed "brain-damaged shit-for-brains devs" to drop the "disgusting drug-induced crap" and use asterisks properly. He's toned it down several notches, basically.
There are several Linux Server distributions available for different purposes. Debian and Ubuntu are popular systems, but there are other smaller providers which are worth considering. CentOS’s support is declining, but there are some young successors such as AlmaLinux or Rocky Linux who are ready to step in.