Same as some of my recent posts: get
jekyll serve working to watch
for changes during a preview of my Jekyll-bootstrap blog.
The default display settings didn’t look great, so I installed
Ubuntu Mono font. Unluckily, one can’t type Chinese
characters, and the bottom line of tmux keeps jumping up from time
to time. Most importantly, the copy and paste function isn’t
convenient to use: every time I need to paste something, I have to
move the mouse to the top of the window, then right click and select
“Modify” → “Paste”. That’s too slow when compared to
mintty which is shipped with Git for Windows.
However, on WLS, aptitude takes good care of package dependencies. That’s much better for installing necessary stuff for blogging with frameworks like Jekyll.
How can I run WLS using a mintty shell?
Firstly, I’ve revised the use of
learnt the function of
ostand for “user”, “group” and “others” respectively.
- The rights to
- Put them together:
chmod og-w [target-dir].
Unfortunately, the Windows 10 bash creates folders and files with
permissions 777 and 666 respectively. The comments for
Microsoft/BashOnWindows#352 solved this problem: instead of
umask 022 in
~/.profile, it should be
~/.bashrc because the login mechanism on WLS is different
from a usual GNU/Linux OS. I think the profiles aren’t process
during WLS startup after having added a simple statement for echoing a
few words in
~/.profile. Lilred’s method is even better.
1 2 3 4
Secondly, I’ve learnt the meaning of
user@OWNER-PC:~$ ssh-agent SSH_AUTH_SOCK=/tmp/ssh-xiwtTnVlI90S/agent.6636; export SSH_AUTH_SOCK; SSH_AGENT_PID=5764; export SSH_AGENT_PID; echo Agent pid 5764; user@OWNER-PC:~$ ssh-add Could not open a connection to your authentication agent.
From user456814’s answer on a Stack Overflow question
about SSH authentication agent, we can see that
the commands to be copied, pasted and ran in the terminal. The
eval saves these steps by taking the output as the command