#unix

1 messages Β· Page 35 of 1

main olive
#

and says that some wheel - permission denied

oak shell
#

use python3 -m pip instead of pip3 btw. That's less ambiguous

main olive
#

I did

oak shell
#

also full output please.

main olive
#

But there is no pip I think

#

wait

#

nevermind,there is

#

Full output?

#

I have sent you a photo..

#

So because of permissions..I came to think it would get fixed if I went root

#

it did

oak shell
#

that's just half of the output

#

also text is better than pictures, especially downscaled and cropped

main olive
#

Fine,I will get the error again,give me a minute

#

What the f****

#

it says installed successfully

#

I am confused at this point!!!! I don't like Ubuntu so mean 😭

#

I am so confused with Ubuntu I want to cry

digital haven
#

do regex work with find in osx?

#

i feel like i must be doing something daft, I'm just trying

find . -type f -regex '.*?\.csv'

rustic sky
#

hmm

#

@digital haven find . -type f -regex '.*\.csv' works for me

digital haven
#

@rustic sky hrm, yeah that worked here as well, so my .*? was stupid, but I thought that was necessary in order not to just greedy match there

#

so I've clearly missed something obvious

rustic sky
#

yeah not sure either

digital haven
#

maybe it needs -E

#

apparently not

#

i try and not use basic regex as it confuses me, but maybe i just use BRE for this πŸ€”

oak shell
#

there is a -regextype option

#

see find -regextype help for a list of available types

digital haven
#

yeah i thought -E did that

oak shell
#

not for find, no. that's a grep option

digital haven
#

there's a difference between mac and linux find versions here then?

#

i didn't get -E to work anyway :/

#

seems to be

oak shell
#

oh, that looks like BSD find on Mac then. e.g. Ubuntu uses GNU find.

digital haven
#

yeah, which is kinda annoying

oak shell
#

BSD is usually more limited in functionality

digital haven
#

hrm, i need to get the GNU version then

main olive
#

Why is my Ubuntu SO SLOW? cpu and ram are stable

#

like really buffering

digital haven
#

@main olive that seems to vague for anyone to possible answer

main olive
#

WELL I CAN NOT TYPE IT IS TOO SLOW

#

it is like about to crash or something

#

72% memory, memory around 20-30 on average

fickle granite
#

I've been poking at computers for a loong time, and still don't have a quick recipe to diagnose slowness

#

I'd look at "top" to see if some process is using all the CPU. Then I'd see if some process is using enough memory to cause it to page ... then I'd look to see if some process is keeping the disk busy

digital haven
#

turn it off and turn it on again...

fickle granite
#

seriously 😐

digital haven
#

it my non-flippant go to i think

fickle granite
#

it's depressing how often that helps

digital haven
#

yeah - if it's a personal system

fickle granite
#

and how rarely I understand why it helps

digital haven
#

I'm trying to stress that i'm not joking though - yeah i agree, i just accept it and move on

fickle granite
#

at work I have a snippet from "The IT Crowd" bookmarked

spice relic
#

how can i download linux cmd line on my mac? I just want to use the cmd line to practice commands

#

is there a website i could go to? on my PC i was able to download a ubuntu app that was just the cmd line

uneven silo
#

its already installed

#

just search for Terminal

spice relic
#

linux and mac are the same cmd lines?

uneven silo
#

yes basically

spice relic
#

all the linux commands work on mac?

#

oh

uneven silo
#

for the most part

#

they use the same shell

#

for example, bash or zsh

#

you probably use bash when you downloaded ubuntu on your pc

#

I think mac uses zsh by default now

#

they're very similar

main olive
#

Hi

main olive
#

@spice relic Anonymous is right in the matter that the two shells use the same syntax, but there are some pretty important differences between the binaries the two systems have (ie the commands you can run). If you want to practice Linux commands, you should get a Linux VM or Docker image.

fickle granite
#

what xx said

#

also you can get a cloud virtual machine for not too much money -- amazon ec2, linode, &c

fickle granite
#

@spice relic probably the easiest and cheapest option is to 1) use the built-in terminal; 2) install "homebrew". Homebrew will bring you a bunch of command-line programs that are more similar to their Linux counterparts than the ones that are built-in to the mac.

upbeat badger
#

Install Linux

vagrant fern
#

yes, very useful advice for someone running a mac

#

i learnt almost all of my command line stuff on my mac, if you want to learn how to use your computer from there, that works out just fine

queen lance
#

if i want to add a new user and add it to group so can sudo: sudo adduser johndoe sudo adduser johndoe sudo Does this look right?

#

on Ubuntu LTS

vagrant fern
#

yes

queen lance
#

thanks

#

do you know if i should be using visudo instead or is that just more work?

vagrant fern
#

as far as i'm aware the standard way to go is to add the sudo group

queen lance
#

okay ill do that then

neon burrow
#

I have a server listening to a port, but I don't seem to be able to connect to it. I have an SSH server on the same machine and connecting to that works fine. I've opened both 22 and the other port in the firewall. Running netstat -tuplen gives the same output for both 22 and the other port. If I run nmap against the server machine, only ssh shows up as open. Any ideas what my problem could be?

neon burrow
#

Nevermind, I was on a VPN and using the wrong IP.

placid hatch
#

How can I pipe this:

tar -cvf /tmp/backup.tar /mnt/somefolder
scp /tmp/backup.tar root@10.14.66.110:/tmp/
rm backup.tar

I would assume it is something like this:

tar -cvf - /mnt/somefolder | scp - root@10.0.0.5:/tmp/

but how would it know what the .tar file is called? I don't want to create the .tar file on localhost even if it is temporary because lack of space. I have enough memory. Even if it is lacking it can still use swap memory.

rain mason
#

trying to install tensorflow 1.15 on manjaro and i'm getting this error every time ```[zora@cottage AIDungeon]$ sudo pip install tensorflow==1.15
[sudo] password for zora:
ERROR: Could not find a version that satisfies the requirement tensorflow==1.15 (from versions: none)
ERROR: No matching distribution found for tensorflow==1.15

placid hatch
#

do pip -V and show output

rain mason
#
pip 19.3.1 from /usr/lib/python3.8/site-packages/pip (python 3.8)
#

weird thing is it was working this morning

#

i had it installed and for some reason python just decided to either delete it or just not see it

placid hatch
#

it is not available for python 3.8

rain mason
#

ah

#

how can i downgrade to 3.7?

#

ik these are completely noob questions and i'd usually be able to figure them out myself i'm just tired out of my mind rn

placid hatch
#

you can keep python 3.8. What I usually do is:

apt-get install python3.7 python3.7-pip
python3.7 -m pip install ...
rain mason
#

oh my word i'm a moron

#

i did that before but i did python3 instead of python3.7

main olive
#

@placid hatch I'd do something like

ssh root@10.0.0.5 'tar zcf - /mnt/somefolder' | tar zxf -
#

used this to create a semi-full backup of a rootfs from a device I can ssh into but not a lot of space on it

#

z flag because i've found that the potential transfer rate gains outweigh the overhead of compressing

#

if that makes sense

#

alternatively, you can just pipe into dd

#

if you don't want to extract

#

so something like

ssh root@10.0.0.5 'tar zcf - /mnt/somefolder' | dd of=backup.tar.gz
placid hatch
#

Thank you!

spice relic
#

Thanks all

#

just saw the comments now

livid nebula
#

hey i had a quick question. if i had a chromebook that could only connect to vpns through the openvpn settings built in, could i use a .ovpn file to connect

warm wolf
#

All the info (ips, certificates, keys etc) should be easily readable if you open the ovpn file iirc, should be able to copy paste

#

Oops that was a day ago, bit late

bitter blade
#

guys i am trying to install vimn

#

vim

#

but

#

i get this error

#

sudo: apt-get: command not found

#

i am using mac btw

#

And Hyper terminal

#

I searched this but i couldn't be able to find the solution

warped nimbus
#

macOS doesn't doesn't use apt thus no apt-get command

#

You could probably install vim with homebrew

bitter blade
#

so can't i use any command to download vim from terminal?

warped nimbus
#

Homebrew...

bitter blade
#

homebrew is an app

#

i wanna do it from my terminal

#

ups mb

#

you are right

main olive
#

homebrew is "an app" the same way apt is "an app"

bitter blade
#

yeah

#

i got this

haughty spoke
#

I got a recommendation to put one of my SSD volumes on f2fs. I'm using OpenSUSE and I'm reading it's no longer an option for this OS. Has anyone experienced this to be true?

glossy geyser
#

Really basic question here. My exam preview asks the following question:

What is the output for:
$ ls | *.csv

I understand what each piece is doing independently, but I'm not sure what piping ls to all .csv files would achieve and attempting it on my computer gives me the following error:

'*.csv' is not recognized as an internal or external command, operable program or batch file.

Which makes sense to me, but obviously the professor expects this to work and it's driving me insane.

#

Sorry for my lack of proper code formatting. I'm not sure how to format code blocks on this server yet (this is my first actual post here), so if someone could point me in that direction as well I would be grateful. Thanks for any and all help!

warped nimbus
#

I'm not sure either

#

if it were > instead of a pipe then it'd make sense

glossy geyser
#

Exactly. 😞

warped nimbus
#

Have you asked your professor or classmates?

glossy geyser
#

She just made these available after our last period and the exam is tomorrow, so probably no time for that.

#

I guess when she asks for the output, I'll just write down the error message.

#

Haha

warped nimbus
#

maybe it was a trick question all along

#

or just a typo. another thing that would make sense is

#

ls *.csv

glossy geyser
#

Maybe so, though she hasn't used trick questions for any of our other exams so we'll see.

#

I appreciate the second opinion, Mark. I thought I was missing something fundamental about piping output.

warped nimbus
#

Maybe I am missing something too πŸ€”

fickle granite
#

seems to me that if you typed it accurately into your command line, then whatever you observed is authoritative

glossy geyser
#

She's gaslighting us all

#

You're right, I should trust the command line more than any prof. I've had some doozies before where I've had to ask for a regrade because they marked me wrong for valid code.

fickle granite
#

my hunch is that she's got a typo

fickle granite
#

which boot option did you pick? I couldn't read it

#

anyway: boot from one of the other options, or a "rescue" thumb drive or something

main olive
#

its notme

main olive
#

my advice - stop trying to install Kali

#

only use it off live USBs or in a VM

#

there is no reason to install Kali

#

installing Kali is a bad idea

#

@main olive

main olive
#

sessions should be nested with care unset $tmux to force

#

why am I getting this message when trying to launch a session

main olive
#

what does echo $TMUX say before launching a session

#

(or lowercase $tmux)

placid hatch
#

that happens when you are already in an attached tmux session.
detach or kill current tmux session then start a new one.

cosmic pine
#

Hello πŸ‘‹ Does anyone know where i can go to download the new python, or what command it is? (i have version 2.7.16 and need the updated version)

white solar
#

Which version do you want to get

tall coyote
#

^ they're on a Mac

cosmic pine
#

I believe its the one above 3, one that’s able to run async and that stuff πŸ˜… Forgot the exact number, i could look it up if needed

white solar
#

3.7

cosmic pine
#

Yeah that

white solar
#

Well, the simplest way to do that is through python.org

cosmic pine
#

is there like a specific place i need to go to download it? When i downloaded it, it just updates python3 and my other one stays at 2.7

white solar
#

Well, to macos to work it needs both 2.7 and 3.x

#

Linux distros often have 2 pythons

cosmic pine
#

hm, well for python i have 2.7 and python3 it’s updated to 3.8 but async still shows up as syntax errors

tall coyote
#

I actually assume you do have both Python 2 and 3, but your editor is using 2

white solar
#

How do you import async @cosmic pine

cosmic pine
#

Well, i have a screenshot of the code i have in #async-and-concurrency . I’m not sure 100% since i just started trying to code with tutorials

tall coyote
#

could you run a terminal and enter python --version and then python3 --version?

cosmic pine
#

Python version: 2.7.16
Python3 version: 3.8.0

tall coyote
#

then yeah, you do have both (which is normal in MacOS and any Linux distro)

#

you should find a way to tell your editor (if you want to run your program from there) to launch it from python3 and not python

cosmic pine
#

Yeah that makes a lot more sense lol. i’ll try looking that up in a bit. Thank you again for your help, and saki! ^^

distant stream
#

Is there a way to update my python3 command to run 3.8 instead of 3.6.9?

worn apex
#

what OS are you on

distant stream
#

Ubuntu

fickle granite
#

ubuntu's pakage manager lets you choose "cutting edge" software sources.

#

I don't remember the details, but you can do it somehow.

#

Also building your own from source is possible, although tricky if you're not used to doing that

distant stream
#

I can't find any info about changing that online

main olive
#

don't try changing the distro's recommended python version

#

instead, use a pyenv to set up a 3.8 environment if you really need that over 3.6.9

grim dock
#

anyone here ?

main olive
#

!ask

shy yokeBOT
#
ask

Asking good questions will yield a much higher chance of a quick response:

β€’ Don't ask to ask your question, just go ahead and tell us your problem.
β€’ Try to solve the problem on your own first, we're not going to write code for you.
β€’ Show us the code you've tried and any errors or unexpected results it's giving.
β€’ Keep your patience while we're helping you.

You can find a much more detailed explanation on our website.

main olive
#

hey

#

who's alive

#

I'm having trouble with tmux

worn apex
#

it's been a while since i used tmux but what's going on

main olive
#

I'm trying to launch something with a new tmux session..

#

but it says I'm already in a tmux session and asks to unset

#

hmm it does seem to be the case..

#
tmux ls
383089679: 1 windows (created Wed Dec 18 11:28:17 2019) [244x35] (attached)
grim dock
#

Hi can i jump in there ??
''''
#!/bin/bash
read -p "Enter your new project name: " project_name
read -p "Enter path for new project: " project_path

if [ -d "$project_path"/"$project_name" ];then
echo "project already exists"
else
mkdir -p "$project_path"/"$project_name"/{doc/{visuals,words},data,results,scripts,tmp} | echo "Creating folder structure for $project_name!"
fi
''''

#

!format

#

uhh how do i format here on the discord??

#

anyway the script is just to always have the same folder structure for my projects.. what i wanted to add was an alias in zshrc for every project so I call access main project folder from anywhere

south star
#

there are tools for that kind of things, z for example is a shortcut to jump the most recent folder of a specific name you went to, https://github.com/rupa/z/ or fuzzy search in shell using fzf is quite nice too.

#

but if you really want what you asked for you could just use something like echo "alias $project_name='cd $project_path/project_name'" >> ~/.bashrc at the end of your script

#

to format code on discord you use triple backticks, like this
```
your code goes there
```

grim dock
#

@south star thanks !! i also found a plug in for Oh my Zsh called pj which should allow me to jump to any project on PATH

warm robin
#

Might be a dumb question, but why do you need to install Python 3.6+ via an external repository on Ubuntu 16?

#

Is it because it's no longer maintained?

worn apex
#

probably

#

at some point they maintain only for security not new significant versions of packages

warm robin
#

Right

worn apex
#

there's also the goal of stability

#

ubuntu 16.04 is maintained until 2021 due to being the LTS version, but

oak shell
#

16.04 is still maintained. But they normally freeze the "main" version of software an LTS release comes with and stay with that.

worn apex
#

it's assumed that if you're using that it's specifically because you don't want to be updating to new versions of everything every few months and dealing with whatever's changed

oak shell
#

so as 16.04 was released with 3.5.x, it stays with the latest 3.5

worn apex
#

the theory is that if you wanted a new version of python why wouldn't you want a new version of ubuntu

warm robin
#

@oak shell Ah that makes sense. Thanks for clearing that up

oak shell
#

easiest way to get newer (also older) Python versions on Ubuntu LTS is the deadnsakes PPA.

worn apex
#

keeping 16.04 around this long is something that only really makes sense if you have an app that works and you don't want to rock the boat

warm robin
#

@oak shell That's what I did, but I only asked to see if there was a better method.

#

I guess there isn't.

worn apex
#

the better method is to upgrade ubuntu πŸ˜›

oak shell
warm robin
#

@worn apex Wish I could, but the computer I needed to install python 3.6 on can't handle anything after 16.04.

main olive
#

Try a more light weight linux

main olive
#

Manjaro xfce is pretty lightweight but I'd recommend mx Linux. Comes with Python3.7

gray geyser
#

Hi All! Looking for someone to do a code review on a python utility I wrote for Arch Linux and Manjaro. Not sure where to post it since an understanding of linux package managers is a must.
It already has a number of users and I would like to get it in a clean stable state. Thanks for the help

uneven silo
#

I can't do a full code review, but send me the repo link and I'll check it out

#

I'm pretty familiar with pacman

gray geyser
#

I try and keep the master branch stable so that is my most recent feature fork^^^.

loud cloud
#

Hi! Does anyone know of a way to display braille in bash?

#

I have this, which works awesome in PS, but not bash.

#!/usr/bin/env python3
# -*- coding: utf-8 -*-

# Takes a number as an argument and returns braille

import sys

try:
    number = int(sys.argv[1])
    if number < 0:
        raise ValueError()
except ValueError:
    print(f'Please enter positive integers only.')
    sys.exit(1)

braille = ['β ΄','β ‚','β †','β ’','β ²','β ’','β –','β Ά','β ¦','β ”']

def converter(number):
    brailleComp = []
    for i in range(0,len(str(number))):
        brailleComp.append(braille[int(str(number)[i])])
    brailleComp = ''.join(brailleComp)
    return brailleComp

# print(converter(number))

# # Test
# for i in range(6,9):
#     print(converter(i))
loud cloud
#

nvm, I made a gui

main olive
#

Hello all, updated my mx Linux with mx test repo packages and now after about an hour of idle, I get this screen, anyone know what it is? Seems to be connected with the firewall I guess...

uneven silo
#

its the kernel message stream

#

nothing harmful

main olive
#

Weird so I'm booted into xfce, and my screen goes to that. That's the weird part. And only way to get out is to shutdown and restart

#

Desktop environment is crashing?

uneven silo
#

could be..

#

can you pop into a tty and get into the Xorg logs?

main olive
#

@main olive ctrl-alt-f1 or ctrl-alt-f7 don't drop you back into X?

magic basin
#

What would be the easiest way to make a currency system on linux?
I would need a program that allows users to do certain things to earn coins, which
they can then spend, but if they logout should still remember their exact amount

main olive
#

Sorry guys off to vacation guess I'll have to try to fix it after I'm back. Ty

south star
#

@magic basin use a ledger system, there are a few around

simple phoenix
#

when i upload files to my ubtunu 18.X server the encoding gets changed to the file is there any way to change that?

eager snow
#

I'm really happy with what i did

#

XD

#

i really begginer

#

And i did a snake game in terminal

#

:D

#

I know this is nothing but i like it

#

XD

main olive
#

@simple phoenix how are you uploading these files?

simple phoenix
#

winscp

#

SFTP

main olive
#

if you use something like scp, it should be a 1:1 copy

#

what do you mean by "encoding gets changed"

simple phoenix
#

well as example my file has a trashcan emoji in it

#

it will get changed to gibber text

main olive
#

oh, how are you viewing these?

#

they need to be served with as UTF-8

main olive
#

hey guys im a newbie, I wanted to gain some core knowledge and get my hands dirty on this operating system

#

first off, what is the difference between unix and linux

#

and regarding running linux on my windows laptop im assuming i can just get a virtual machine and use that

#

also whats the significane of running python on linux operating syste

magic basin
#

@south star what is that?

south star
#

what is what?

ruby fjord
#

@main olive

and regarding running linux on my windows laptop im assuming i can just get a virtual machine and use that

Yes

#

Depends why people use Linux, some for customisation, some use it since it's open source

simple phoenix
#

@main olive with the inbuilt editor

#

i also downloaded them off the server and they are gibberish

south star
#

@magic basin oh, a ledger system, well, that's what accountant use to manage money, it's a sequence of entries saying how much money goes from where, and to where, sometime with multiple inputs and outputs, so A and B are sharing a payment to C and D, you can say A -> -10, B-> -5, C -> +7, D -> +8

#

and you can add metadata to this information, the transaction date, a description, etc

steel verge
#

I have a quick question: Can network block devices be routed or only switched? The internet is very sparse with that information.

#

I know Fiber Channel can be routed if used with FCoE, but that isn't really NDB anymore, is it?

elfin notch
#

Can anyone help with gpg?

shy yokeBOT
#
ask

Asking good questions will yield a much higher chance of a quick response:

β€’ Don't ask to ask your question, just go ahead and tell us your problem.
β€’ Try to solve the problem on your own first, we're not going to write code for you.
β€’ Show us the code you've tried and any errors or unexpected results it's giving.
β€’ Keep your patience while we're helping you.

You can find a much more detailed explanation on our website.

warm wolf
#

Annoying thing that is making me go crazy: after doing an apt upgrade a few days ago something seems to have decided to mess with my iptables on every boot (input and output set to block). I installed iptables-persistent and it runs fine but whatever that rogue thing is it's running afterwards, so I have to manually set the rules in terminal. Anyone know a sane way to diagnose or fix this?

main olive
#

I've had something like this with another program... what I ended up doing was move the iptables binary somewhere else entirely and replace it with a wrapper script, which had something like this in it:

#!/bin/bash

< /proc/$PPID/cmdline tr '\0' ' ' >> /tmp/whocalled
/my/real/iptables $@
#

@warm wolf what this does is it logs every call to iptables before executing the real one

warm wolf
#

ty that's smart, I'll give it a try

main olive
#

oh, you should probably echo a newline into that file as well

#

otherwise it might get very messy very fast

#

I think I even redirected /proc/uptime into that file as well to make it a bit clearer when something was being called

#

@warm wolf let me know when you find out what it is, I'm curious

warm wolf
#

/usr/sbin/nordvpnd lmao. well at least it's blocking all network traffic so it can't be sending my private info πŸ˜„ @main olive

main olive
#

πŸ˜‚

#

classic

warm wolf
#

thanks for the help though, wouldn't have thought of that

main olive
#

not a problem dog

#

anytime

warm wolf
#

seems it's documented behaviour

#

at least

main olive
#

bad choice to make it opt-out instead of opt-in, though

warm wolf
#

oh I had kill switch enabled before, it's just it used to only block connections if you temporarily lost connection to the vpn for example, not for all the time you're not connected. still not a very user friendly way to do it though, should be an extra opt-in like you said

main olive
#

ah I see

native sluice
#

how do i install git onto server?

warped nimbus
#

Which distro

native sluice
#

what does that mean?

warped nimbus
#

Which OS?

native sluice
#

Debian

warped nimbus
#

Operating System

#

sudo apt-get install git

#

run that command in the terminal to install git

native sluice
#

ok

#

thx it worked

warped nimbus
#

You're welcome

main olive
#

@native sluice for future reference, "how to install git on Debian" on Google will help

wispy idol
#

Hello guys, I'm currently going through the book "the linux command line"

#

but I'm on a mac

#

would you say it matters?

#

or should I install a linux distro

fickle granite
#

it does and it doesn't.

wispy idol
#

for example, sometimes the --long options doesn't work on mac

fickle granite
#

yeah, Mac is from a slightly different branch of the "unix family tree"; you'll find a lot of little discrepancies like that.

#

you can install homebrew, and get their versions of the various tools -- they're generally much closer to (often identical with) the linux versions

#

or you can install (say) VirtualBox, and then install a genuine Linux distro, and run it

#

that's a fairly large download, and requires a bit of effort; but it works well

wispy idol
#

I use parallel

#

is it the same?

fickle granite
#

you could use "vagrant" to make it easier

#

parallel iirc means you reboot your laptop, and then get to choose to boot Mac vs something else

#

I've never tried it, but I figure it's kind of inconvenient

wispy idol
#

I already have homebrew

fickle granite
#

with vagrant/virtualbox you don't have to reboot

wispy idol
#

but I don't know how to use it

#

or where to learn it

fickle granite
#

ah, "where to learn it" is not going to be super-easy: homebrew has plenty of docs, but as you've probably noticed, they all assume you know a lot about linux

wispy idol
#

what is homebrew exactly?

fickle granite
#

I'd try virtualbox, and perhaps vagrant to make it a bit easier to use (although it's not that hard)

wispy idol
#

it it like a package manager

fickle granite
#

homebrew is a collection of free software that's really easy to install on a mac

#

yes: they call themselves "the missing package manager for mac"

#

so you could say, right now, brew install findutils, and you'd then gave "GNU find", which is more unix-y than the version you now have

wispy idol
#

so basically intsalls software for mac that matches that of linux

fickle granite
#

yes.

wispy idol
#

this is so complicated though

fickle granite
#

it's still not exactly the same, but it's much more similar than what you now have

wispy idol
#

I just started to learn programming

fickle granite
#

this stuff is only somewhat related to programming

#

you can do plenty of python without homebrew or unix

wispy idol
#

is unix the command line language?

fickle granite
#

another option, if you don't mind spending some money: get a cloud host, like from Amazon EC2, or linode, or something like that.

#

Unix is a family of operating systems, all of which traditionally come with a command line.

#

MacOS is arguably unix

wispy idol
#

oh

fickle granite
#

but there are "branches" of the family tree; Linux you could say is on the "GNU" branch, whereas MacOS is on the "BSD" branch. They are sort of cousins.

#

or they're like chimpanzee versus organg-utan

wispy idol
#

ok

sage solar
#

Basically the history for MacOS goes

Unix -> BSD -> more BSD -> XNU (MacOS)
and linux
Unix -> Minix -> Linux

fickle granite
#

similar in many ways but also different in some ways

wispy idol
#

ok

#

I will probably stick with mac os for a while

fickle granite
#

nothing wrong with that

wispy idol
#

don't really need linux for programming now

fickle granite
#

if you're programming, you won't run into many differences at all.

#

I regularly write little python toy programs, and they work exactly the same on MacOS as on Amazon Linux, for example

wispy idol
#

ok

#

and how do you check whether you have homebrew installed on your mac?

sage solar
#

you open a command line and enter homebrew

wispy idol
#

ok

#

that's es

#

is says command not found

#

oh that means it's not installed

#

I just pasted the install command on my laptop

fickle granite
#

actually the command is brew, not homebrew

main olive
#

yeah, it's brew

#

you can install gnu coreutils via brew, which is (probably) what your book is based on

covert dune
#

Id like to install Mac os on my little bros laptop... Tired of saying no you can't borrow your sisters expensive ass macbook

#

But I dont know where to start

#

Or if this is even possible

white solar
#

What laptop is it @covert dune

#

Hackintosh are quite often nowdays

covert dune
#

Its an Acer aspire

#

Not sure the exact model

white solar
#

Does it have upgradable wifi card

covert dune
#

How would I check

white solar
#

Open up the laptop

#

Unscrew the screws that hold laptops backplate

covert dune
#

Sounds scary

white solar
#

Not really

#

Just 6 to 8 screws

#

Fiddling with clover bootloader is scary

covert dune
#

Yeah it looks like you can pop the card out

white solar
#

Mind taking a pic?

covert dune
#

@white solar Sorry for the late response, i spoke with my bro, he said he wants it on his Dell instead, so i had to open that one up. The bottom one right?

#

Says wlan so I assume so

#

What are the other slots for

white solar
#

Ye nice

#

Other slots are for more network cards

covert dune
#

@white solar Cool, how do I start? Looks like I need to make a bootable USB, need to use my own macbook for it?

uneven silo
#

no theres a few tools out there

white solar
#

you need a way to burn an iso onto an usb

#

and to burn an iso is to somehow acquire macbook

uneven silo
#

gibMacOS

main olive
#

this is why I keep my macOS VM around

#

might need to use hackintosh-related tools which only work on macOS

uneven silo
#

uh

#

the only tools like that I know of aren't even useful outside of macos

south star
#

xcode, i guess, and an ios simulator, if you want to try iphone/ipad stuff without the hardware

heady briar
#

Can anyone help me with a networking problem? My laptop can access Google, Facebook and YouTube but can't access websites like stackoverflow, reddit, udemy etc

#

Im using debian

south star
wraith jasper
#

Hello, I need to import a script/module as root user. That is all.

import rootscript
rootscript.testclass.examplefunction()

Yes i know that i can run the script with subprocess module and i tried to find a different solution but it would help me a lot if i could just do it like i asked above.
Thanks in advance !

#

feel free to ping me

south star
#

a process runs as root or not, you can't have part of your app happen "as root" and not others

#

so either you run the whole script as root, or you use subprocess to run this part as root

wraith jasper
#

ya but with subprocess y execute the script as in command line

fickle granite
#

πŸ€”

magic basin
#

ok ok... i am using the cat command, to print a text file with the text: the cat jumped over the dog. how can i make the words cat and dog a different colour when it's outputted?

#

and the rest of the text plain white.

fickle granite
#

I actually don't know. I could write a python program to do it, but that's not really what you're asking.

magic basin
#

well actually python would work but maybe it would be a little slower?

fickle granite
#

not enough to notice

magic basin
#

ok

#

you can try

fickle granite
magic basin
#

but that prints the whole line

#

Not specific words

main olive
#

@magic basin print it in parts then

magic basin
#

do you mean like use ; ?

#

i tried that but it puts it on a new line

main olive
#

no

#

I mean like

fickle granite
#

"parse" your input to see if there are any words in it that need coloring

#

if not, just print the input as it

#

but if there are some need-to-be-colored words, print the input plus whatever mojo you need to color those words

main olive
#

^

craggy hamlet
#

so im trying to install chromium os on a spare surface 3 i have. i got it to boot the usb, i get the chromium splash but then it nothing ever happens. it just finally goes to a black screen ( i think turning off)

south star
magic basin
#

Is it faster to print in python or to use os.system(β€˜echo ...’) @south star

south star
#

print i'm sure

#

os.system needs to start a subshell, so a new process, with your user's shell inside, setup variables, create input/output streams, and then inside that a new echo process, unless it's a function in that shell, and again input/output, etc, print just write to an existing output stream

#

the difference in time would be negligible unless you print millions of them i'm sure, but why would you prefer to use os.system for that i can't imagine

#

starting python is slow, if you start it thousands of times just to print one thing each time, it's clearly wasteful, but once it's started, you can do a lot with it and that's fine

#
gabriel@gryphon:~> time echo "exit()"| python

________________________________________________________
Executed in   59,34 millis    fish           external 
   usr time   36,82 millis    3,02 millis   33,80 millis 
   sys time   15,02 millis    0,00 millis   15,02 millis 

13:55:41 29/12/19 5,06/ 100% 59
gabriel@gryphon:~> time echo "exit()"
exit()

________________________________________________________
Executed in  104,00 micros    fish           external 
   usr time   99,00 micros   99,00 micros    0,00 micros 
   sys time    6,00 micros    6,00 micros    0,00 micros 

13:55:46 29/12/19 5,53/ 100% 0
gabriel@gryphon:~> time echo "exit()"|cat
exit()

________________________________________________________
Executed in    1,75 millis    fish           external 
   usr time  447,00 micros  447,00 micros    0,00 micros 
   sys time  1204,00 micros  140,00 micros  1064,00 micros 
main olive
#

@south star exactly, iOS simulator and a few jailbreak-related tools come to mind

#

among others

fickle granite
#

yikes, now I've got a Thin Lizzie song in my head

#

β™­β™© β™―β™ͺ Tonight there's gonna be a jailbreak ... somewhere in this town β™« ♬

wraith jasper
#

how can i compile python code to binary ?

#

i am suing python3.8.1

#

i tried nutika but it doesnt support python3.8 yet..

#

and for some reason i can't install python3.7 which is supported

main olive
#

use pyenv to install 3.7

#

also pls don't sue python

heady mural
#

I have setup a linux user and tried to limit its access to one specific directory. However when trying to connect using FTPS using FileZilla I'm getting

Error:    FATAL ERROR: Network error: Software caused connection abort
Error:    Could not connect to server```
I'm not sure how to troubleshoot it
#

in /etc/ssh/sshd_config I have the correct settings afaik:

Match user gta
  ForceCommand internal-sftp
  ChrootDirectory /mer/
#

Oh and it worked before I changed the directory permissions of my /srv/fivem directory so basically because it caused this issue I'd removed the user, the directories and restarted with the information about, in directory /mer/ and with user gta

#

also for my main user wiht sudo power it does work which is ... strange.. because gta is a fresh user

rain moth
#

is there a way to unset HISTFILE in vscode's launch.json for python debugger? its polluting my history, reverse search becomes impossible

main olive
#

@rain moth I set the following in my .zshrc, you can put it in your .bashrc or whatever

if [[ "$TERM_PROGRAM" = "vscode" ]]; then
  unset HISTFILE
fi
#

or the shorthand

[[ "$TERM_PROGRAM" = "vscode" ]] && unset HISTFILE
#

if that's your thing

main olive
#

mind you this also disables history in the integrated terminal, but I personally never use it

rain moth
#

@main olive thank you fam
i ended up writing a postDebugTask in python to delete the vscode debugger commands from my history, each command is like a page in length with an ungodly amount of arguements lol

#
with fileinput.FileInput(filename, inplace=True, backup=".bak") as file:
    for line in file:
        print(re.sub(r"source.+|.+runserver", "", line), end="")
main olive
#

yeah they're pretty long

magic basin
#

i'm having a user run a python file in their .bashrc when they logon... this python file also opens other files.. but i am getting the error message:
python: can't open file 'setup.py': [Errno 13] Permission denied

sage solar
#

well then check the permission flags for that file with a quick n dirty ls

magic basin
#

it seemed to have stopped working when i edited it using root... is that a thing?

#

do files suddenly stop working after root has edited them?

sage solar
#

files of course dont stop working

#

but if root owns the file of course other users dont have read or write permission to it unles you explicitly set the corect flags

fickle granite
#

@magic basin of course that's a thing. The file is probably now owned by root.

#

A good text editor will make sure that doesn't happen, but ...

main olive
#

@magic basin chown the file

frank coral
#

Hello, I've launched a python program with the -m option, I'd like to know how to kill it. I tried pkill my_prog but it didn't work

silver tide
#

idk if it's the proper way to do it, but I'd just find the process's pid using ps ux | grep python and then do kill <pid here>

frank coral
#

I did that, not working

#

Oh, in fact it worked

#

Ty

oak shell
#

no ps|grep please. You can use pgrep for that. pgrep -af for showing and matching the complete command-line.

#

and pkill -f for killing all that matched with the same pattern you checked with pgrep -af

frank coral
#

Yep, I used prep -af to find the process id

silver tide
#

@oak shell thanks, what's wrong exactly with ps|grep though?

oak shell
#

it's mainly less convenient. e.g. you'll always get the grep process listed too, and it matches across all columns of the ps output, not only the command.

frank coral
#

Another silly question. I launched a python program on the shell via ssh and I would like to close the shell (and/or the connexion), without closing the program.

oak shell
#

for human eyes it's good enough because you can filter it further and pick the entry you want, but especially scripts should not use it, because working around those issues requires much more complexity than simply using the tool made for the job

#

You'd need to start the command with nohup/disown, or e.g. in a screen.

#

Or if it's something you want to have running permanently, like a bot or server, you should make a systemd service for it instead.

silver tide
#

@oak shell ah right, sure

frank coral
#

I'll into systemd, but for a quick fix, I think nohup is perfectly what I want

#

nohup worked perfectly, ty

main olive
#

for ip in 'seq 1 254' ; do

#

ping -c 1 $1.$ip | grep "64 bytes"

#

can somebody explain me what this sequence thing does en what $1.$ip exactly defines?

warped nimbus
#

$1 is the first arg given to the script

#

$ip is the current number in the sequence of the for loop

#

seq just creates numbers from 1 to 254

#

and the for loop does a ping and grep for each number

main olive
#

thank you : )

gray geyser
#

Hi All, looking for someone to do a code review on a project I have been working on for a while. Experience with Arch Linux or Manjaro is a must since it is a project designed specifically around the pacman package manager.

Many Thanks

https://github.com/JustinTimperio/pacback

rain moth
#

Rip my Ubuntu machine after installing vagrant

oak shell
#

well, enter, login, and type journalctl -xb as suggested

rain moth
#

While vagrant was installing it was altering boot files

#

I've been trying on it for a while, I'm on page 7 of Google

#

I guess I'll have to do a fresh install :/

oak shell
#

The main problem seems to be the last red error, about the dev-mapper-isw_whatever.device

rain moth
#

It's on raid 0 UEFI duel boot

#

That comes with its own set of problems

oak shell
#

that looks like it's trying to initialize some RAID array but failing for whatever reason.

#

could you systemctl status dev-mapper-isw.... (use TAB to autocomplete)

rain moth
#

I did wipe root just now :/

#

Problem is I need vagrant to test my deployment scripts

#

Idk what else to use

#

That's all I needed it for

oak shell
#

not sure if vagrant can be to blame for that. Might also be a hardware problem that just occured now as a coincidence πŸ€”

#

you said dual boot, does the other OS on this array still work?

rain moth
#

I have a install bash script that intun whenever I chance distros

#

I rebooted after each install until vagrant was installed

#

Tested it 3 times with fresh Ubuntu installs

#

Vagrant always sent me to emergency mode

#

Yeah windows loads fine it's not affected

#

It's on its own set of partitions

oak shell
#

hmm. I only used vagrant once, not much experience with it or knowledge about what it does that could have an effect here

rain moth
#

I would tar my root if you ever thought about installing it lol

#

Burned a whole day recovering settings

fickle granite
#

vagrant might be installing, or messing with, some virtualization stuff

rain moth
#

Yeah I saw it in the terminal it was messing with /boot

#

How do you guys test deploying a Django app for example, do you just test it on the cloud instance?

oak shell
#

You could use a regular VM, or just localhost?

rain moth
#

It's my main development machine I didn't want to bloat it

#

Virtualbox works fine, can I ssh into that?

oak shell
#

sure

rain moth
#

Thanks will try that

oak shell
#

just gotta install an ssh server in your vm

fickle granite
#

testing deployment is hard

#

sure you can deploy it to a test box ... but that box is probably different from the real box in some important ways

rain moth
#

You're right fam, vagrant worked before I rebooted and it didn't even ask for sudo lol

vagrant fern
#

you can try systemd-nspawn & debootstrap

spice relic
#

from the cmd line i did printenv | less and the next screen ends with (END). how do i go back or exit out of this?

oak shell
#

press Q to exit less

fickle granite
#

or, more precisely: q

oak shell
#

or H for the help screen

#

(wel yeah, without Shift)

spice relic
#

ahhh thanks

spice relic
#

is it best practice to use underscores for spaces when naming files?

fickle granite
#

yes

#

spaces in file names break all sorts of stupid tools

#

they're stupid, but sometimes you need them

main olive
#

underscores or just dashes

#

I personally think dashes look better for lower-case-things and underscores for UPPER_CASE_THINGS

#

i'm in this predicament, i installed minimal iso of debian buster, but in order to get access to the internet i usually have to go thru this procedure of logging into the intranet of my dormitory. But I can't do that with no browser, can't have no browser with no gui, can't have no gui without installing it, can't install it cause got no internet. Anyone got any clue whatsoever how to deal with this?

fickle granite
#

underscores and dashes are both safe in file names

#

although I wouldn't start a file name with a -, that might confuse some unix-y command-line tools

warped nimbus
#

@main olive headless browsers do exist

oak shell
#

yeah sure, but probably not preinstalled...

warped nimbus
#

Surely you can install a package offline

oak shell
#

and whether the dorm capture portal is supported is another question

warped nimbus
#

By transferring it via portable storage

main olive
#

Ive never worked with headless browsers, and never actually tried to look for/install packages offline. Could you provice any more specifics?

#

I can load some packages onto a flash drive and presumably install it that way, but I can't imagine logging into anything with no gui. how's that work?

main olive
#

@main olive links doesn't work?

#

@main olive what is links?

#

console based browser

#

I haven't tried anything yet, @school now. I read on some headless browsers, still dont fully understand how the interaction works

#

ill try it

#

commonly included with distros, IIRC Arch comes with it

#

not sure what you're running

#

i got debian buster minimal, nearly nothing

#

will need to hand install it

#

ah yeah probably need to use usb or something to install it

#

alternatively, use Burp or something to see what request is made to the web gateway and repeat that on the Debian machine with curl

#

its basically an extremely basic login screen that runs on a mikrotik

#

even more alternatively, share a connection from an already connected machine

#

if nothing else helps ill just do manual post

#

and pray it works

main olive
#

yea ended up doing a manual forged request via a python script

#

worked like a charm

spice relic
#

idk which chat to use, but i'm getting this error trying to ssh into my ec2 using Secure Shell App

#

Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
NaCl plugin exited with status code 255

#

i tried chmod 400

clever skiff
#

So I heard that it is better to use Linux for Python app development, can someone explain the reasons of that?

uneven silo
#
  1. That's totally subjective
  2. Even so, I agree with it because Linux is much centralized in terms of software packages and whatnot
fickle granite
#

I'd say it's only 50% subjective

uneven silo
#

How so?

fickle granite
#

Python is open-source; most open-source was designed, explicitly or implicitly, to run on "open" platforms. Linux is the only open platform. MacOS isn't too different, but Windows is very different.

uneven silo
#

Uh

fickle granite
#

So if you use Windows, some stuff will work fine, but I lot of stuff either won't work at all, or will require you to do relatively obscure stuff

uneven silo
#

I don't think that's really correct

#

Pure python code runs fine on any platform

fickle granite
#

e.g., on Windows, some python packages are hard to install because they assume you have a C compiler available; I don't think that's the case on the average windows system

#

sure but the world includes more than "pure python code".

uneven silo
#

Well yea

fickle granite
#

and we don't know what @clever skiff intends to do; perhaps image manipulation, or buidling a GUI

uneven silo
#

Which are fine on windows without a C compiler

fickle granite
#

shrug

#

wrong examples, perhaps.

#

let me rephrase: I have explained why I prefer Linux for python development. Others may have other opinions.

uneven silo
#

Ok I guess it's not totally subjective

#

Configuring cl is a pain on windows

spice relic
#

how do i rename a VM using VirtualBox? When I go to the VMs settings the name is grayed out

tall coyote
#

do you have any VMs running? (I didn't realize this question was asked an hour ago)

main olive
#

@spice relic you need to fully stop it, not just suspend

spice relic
#

its not running anymore

#

btw how do i create multiple saved states

#

@main olive

main olive
#

? You just create them

#

I'm not sure I understand the question

#

you can make any number of snapshots

spice relic
#

where are the saved states?

#

i only know that if i exit the vm it asked if i want to save the state

#

oh do i just slick Take whiel the VM is running?

main olive
#

yes

spice relic
#

oh i didnt know saved state isnt the same as powered off πŸ˜…

main olive
#

that's what I said earlier

spice relic
#

oh i missed your comment mb

subtle pike
#

I think this is the right channel to ask this

#

if I want to dual boot Ubuntu, can I just shrink a volume on Windows to create empty space, and then install from a boot drive?

#

i.e. I don't have to explicitly create a partition on Windows

main olive
#

shrink from the boot drive, it comes with a tool for it (gparted)

#

shrinking a mounted and in-use partition is a bad ideaℒ️ even if windows let you do it

subtle pike
#

oh well, I already did it

#

now I know

#

thanks!

spice relic
#

how come when a snapshot is created, it appears as if its a child folder? It makes me think that if I delete snapshot 1 it will delete everything under it

warped nimbus
#

I think it will

#

That is how it works in vmware at least

#

They are incremental snapshots rather than full ones each time

#

Deleting snapshots won't revert the current state though

stuck folio
#

hey all, I'm trying out systemd after it was recommended by someone here for my discord bot stuff. I was wondering, if I have a service set up to start on system boot and restart after a crash, but want it to be able to shut itself down without being restarted, how would I do that? could it be done with just the systemctl stop command and os.system, or is there a better way?

#

I've currently got an async program that can start a bot and establish a socket connection with it but someone in this server suggested systemd instead for monitoring multiple processes

red raven
#

So I am trying to run a jar file but it is throwing errors, I saw online someone said switching to java jdk8 fixed the problem. Now when I try to install the jdk is keeps throwing errors saying its decepted now, when I run java -versions I can see I do have java jdk-8. Now how can I run my jar file with jdk8 instead of 11?

#

Without uninstalling 11

fickle granite
#

not really UNix, not really python

red raven
#

??
how is it not unix

#

i need to run java jdk8 through unix

stuck folio
#

this is also kinda the python server

red raven
#

Yes it is, but this is the unix channel

#

I would agree if I posted in the standard help channels

fickle granite
#

it's unlikely that Unix has anything to do with your problem, just as it's unlikely that the air in your house has anything to do with your problem

red raven
#

it's unlikely that Unix has anything to do with your problem, just as it's unlikely that the air in your house has anything to do with your problem
@fickle granite why are you so salty?

oak shell
#

"decepted"? You mean "deprecated"?

#

Also you didn't state any details about what OS you use, what kind of Java you installed and how, etc. That would be required.

#

And the full and exact output with these error messages would be good too.

red raven
#

I figured it out. Running java jdk8 throws the same error though. It is: Exception in thread "main" java.lang.NoClassDefFoundError: javafx/fxml/Initializable

uneven silo
#

lmao

red raven
#

I am running ubuntu 18.04

uneven silo
#

that's not a java/os/platform error

#

the code is borked

red raven
#

i figured after switching

#

I used: update-alternatives --config java

oak shell
#

@red raven Actually you should have used update-java-alternatives, because there's about a dozen commands related to java that all need to be updated together - which this tool does for you. Also for JavaFX you need to sudo apt install openjfx, as that library is packaged separately from openjdk.

magic basin
#

i have a very weird question - how can i set specific computers/devices to connect to my server via ssh? i am talking about restricting users to connect from only one device

(i am trying to implement some form of anti-account sharing system. sure, i could just block other IPs under the same username, but what if their IP changes, or they use a dedicated VPN... anyway, how would one do this?

magic basin
#

can i filter mac addresses in /etc/hosts.allow and if so, how would i do it?

main olive
#

i don't think so

#

@magic basin what do you think about iptables firewall?

magic basin
#

can someone please help me to install shell in a box, i set it up and i am getting refused to connect error

main olive
#

maybe iptables rules?

#

@magic basin

toxic patio
#

Hey guys I am currently working in a WSL with Ubuntu and have been trying to use the rsync command but it is not transferring over the files

main olive
main olive
#
cut -d ' ' -f "some code here" $@

input data eg.
1 2 3 4 5
first number should be as a field's number and rest as a argument list for cut command
I though about using 2nd cut right there, but I don't know how to place it
like so (it's a concept - does NOT work)

cut -d ' ' -f (cut -d ' ' -f 1 $@) $@

but I think inner $@ will steal all arguments, so outer cut won't have anything to work on

oak shell
#

so for 1 2 3 4 5 you want 2 as output, 4 12 34 56 78 90 would be 78 etc?

oak shell
#

@main olive I think you can do that with a single variable expansion directly in Bash.

echo "${@:$1+1:1}"
#

this syntax does slicing of the positional argument array, returning 1 element starting from the index $1+1 (+1 because we want to skip the first item that works as index parameter)

#
myfunction() { echo "${@:$1+1:1}" ;}

myfunction 4 12 34 56 78 90
# output: 78
main olive
#

❀️

#

i knew there will be something simpler πŸ˜…

#

thank you

fickle granite
#

friends don't let friends write Bash

oak shell
#

bash is fun

#

sometimes

sage solar
#

except when its not

#

(often)

uneven silo
#

better than PS or cmd scripts

fickle granite
#

certainly better than cmd. Dunno about powershell; I've never used it. (It sounds like it has some good ideas, though)

rotund imp
#

I've only heard good things about powershell

warped nimbus
#

My understanding is it can be quite powerful as it has access to a (subset?) of .NET APIs

#

It's not like shell scripting where one relies on subprocesses

#

Well, maybe that's the wrong word. I mean it doesn't need to delegate work to external binaries like awk, grep, etc

uneven silo
#

it is powerful, but its awkward

main olive
#

what I like and simultaneously dislike about Powershell is that everything is an object

#

it makes some things beautifully elegant and other things fugly as hell

#

mind you, most of my experience with it is due to Yara or similar

south star
#

yeah, that was one of the big ideas about it, didn't use it much, but it does seem kind of weird, for a shell language, and definitely different from the simplicity of piping (even if this simplicity makes it very limited in some situations)

weak estuary
#

worth getting linux as a applied physics major?

digital haven
#

@weak estuary what does "getting linux" mean?

weak estuary
#

change windows for a linux distro @digital haven

digital haven
#

@weak estuary depends what you're using it for

#

if your course uses sw that's all windows then there might not be much point

weak estuary
#

ehm general engineering programs and questions, school related work only

#

and private projects

#

school pcs use ubuntu linux

digital haven
#

if you want to use linux and there are no dependencies on windows from uni then it can't hurt really

weak estuary
#

is it advantagous in the long run?

#

i mean it seem to get pretty good because of the cmd

digital haven
#

it's a massive "how long's a piece of string" question though. If the question is "is knowing how to use the terminal useful" then my answer would be yes, it's useful

weak estuary
#

and then some distros makes you able to customize all which seems fun

digital haven
#

linux won't make you good at bash scripting, or shell scripting, i think plenty of people use it without

weak estuary
#

but ppl been telling me windows command line is bad

#

use linux

#

i personally find windows cmd to work decent

digital haven
#

cmd is crap afaik yeah ha, I've never had to use it though πŸ™ƒ

#

ah ok , well if it's working all good i guess... like i say - i've never needed to use cmd

weak estuary
#

how come?

#

mac user?

digital haven
#

because i don't use windows, mac / linux, yes

weak estuary
#

i see, which distro do you recommend?

digital haven
#

don't think it matters, lubuntu is fine

weak estuary
#

i wouldnt mind changing to ubuntu, but somehow i in someway crash the installation

#

i get my usb bootable

#

then when i click install in the preview env, it freeze

#

i thought asking someone at uni next week

digital haven
#

can't hurt... whenever i've installed i've just wiped windows and replaced

weak estuary
#

i see, is it hard to setup the environment to work

#

like eclipse and stuff

#

in path variables

digital haven
#

idk i don't use eclipse, but i expect it's pretty straight forward

weak estuary
#

okay ill keep it in mind thanks

digital haven
#

πŸ‘ imo thinking about which distro is a waste of time

#

lubuntu is light and you'll find solutions easily bc it's ubuntu based.

#

you'll have terminal/browser/editor open... they all look pretty much the same at that point

weak estuary
#

but i like gnome

#

is it easy to download lubuntu?

digital haven
#

personally i don't care as i have browser/editor/terminal... it's easy to dl yes

weak estuary
#

its not so popular

#

so mb doc is bad

digital haven
#

idk, not been an issue for me

placid hatch
#

You can also install Linux and Windows giving you the option to use whatever you prefer at the moment. You could also install a virtual machine with Linux on it.
At home I am using Windows because most programs only support Windows. At work I have Windows but I have a virtual machine which is where I'm spending the majority of my time. And in my spare time when I'm programming I SSH into a headless VPS (no Desktop installed). I still develop on Windows but I deploy on linux machines.

Getting linux is worth it and if you aren't familiar with it you should get familiar with it. But you shouldn't feel limited. Linux is arguably better than Windows but Windows is a lot of times more convenient. I do all my documents, presentations, drawing graphs, checking mails on Windows.

#

@weak estuary

devout cedar
#

could someone take a look at #help-grapes that is familiar with linux

#

less python problem more linux problem but unsure where to ask this problem

south star
#

i don't think that's common now, but it's true that there are always some computers on which installing requires more fiddling than others, the alternate installation (console based, not graphical) can work better in such situation, but sometime just passing a few parameters to the kernel at boot can help as well. it's always good to just google the model of your computer and "ubuntu installation" and see if people reported problems and solutions.

#

i've been using linux for a long time now, and very happy with it, i do think it's useful to learn shell scripting and a bit how your system works, usually you do that more when using linux than using windows.

weak estuary
#

@placid hatch okay thanks for the information, but how about memory in a virtualbox? when you download eclipse to it lets say? in dualboot, you split then memory or disks, how about here? i just download more stuff in my disk? can i remove things from my windows pc from the virtual box? or do i even need to download programs which i already have on windows? just checking where the constraints are, you know?

uneven silo
#

anyone kept up with Mint? is it still a viable new-user distro?

weak estuary
#

yes

#

its the go to user friendly distro

uneven silo
#

i just haven't heard much about it after whatever scandal went down

main olive
#

@uneven silo I wouldn't use Mint. Ubuntu Mate seems like the more reasonable choice

#
uneven silo
#

oh im not asking about it for me

#

I was just wondering

#

thanks tho

main olive
#

ah yeah fair

#

haven't heard much about them recently

marble spear
#

Which linux OS is better for programming? Like, in general, which one would you guys recommend for someone who never ran linux before? People keep talking about how linux is better for programming so I decided to give it a try on vbox. Currently using w10 pro on host

warped nimbus
#

It's mostly personal preference

#

My suggestion would be Debian but I've heard Mint is also a good start

cold pagoda
#

Yes. I've programmed for years on Windows and never really had an issue with it. I do like my current OS (Ubuntu 19.10), but I'm not sure if I would say it's always "better for programming"

frank coral
#

ubuntu is most common distro

#

I find Debian a bit too conservative

marble spear
#

I don't know, it's just what I heard on basically every youtube video. Since I just started learning the area I was confused a bit on why

#

So, Mint and Ubuntu

#

Since it's on VM I can test both I guess

frank coral
#

Well usually installation tutorials are made for UNIX system

warped nimbus
#

For certain areas of programming it may be better cause it gives you more control over the system. So it's for power users, and that can be useful when programming.

marble spear
#

I see

#

Makes sense

warped nimbus
#

In general programming is perfectly viable on any OS

frank coral
#

For beginners errors can be more harmful too

marble spear
#

You mean one of my errors can be more harmful?

#

That's surely something to keep in mind lol

frank coral
#

Well like Mark said, you have more power on your system, which means a wrong command could do more damage

marble spear
#

Yea makes sense

#

Mint looks very good, I will probably start with this one. Thanks guys

warm bramble
#

R.I.P Mark Greaves

#

They worked for the Peppermint OS team.

main olive
#

@cold pagoda again, it's mostly personal preference, but I've found that setting a dev environment up in Linux is far easier than in Windows, and everything just integrates better

#

not saying that's not possible in Windows, but it just seems a lot more... finnicky

heady seal
#

Hello

#

I am trying to use regex to find words like this

#

LHJUAOQQJ

#

Random all caps word

#

In a text document, what regex expression can I use for this?

cold pagoda
#

I'm not sure if this really fits unix, but you can use word boundaries combined with a capture group that looks for caps

heady seal
#

Sorry, but thanks for your help

#

I'll let you know

main olive
#

hi

#

how do I grep but not capture the variable name

#

PROJECT_ID=$(gcloud config list project|grep project)

#

when I grep project.. i get project = projectID.. but I just want to grep the projectID, how should I go about this

#

nevermind.. I just had to run that question through my head once.. lol

uneven silo
#

awk works

main olive
#

I used cut and a class selection

#

I need to like.. pick one and stick with it long term.. what do you suggest..

uneven silo
#

oh either one

#

awk might be shorter

fickle granite
#

I use cut a lot, and awk almost never, probably because I can remember how to use cut but can never remember how to use awk

#

and what I want is rarely more complicated than "extract the sixth through eighth fields"

uneven silo
#

well for your example, the awk command would be awk '{ print($3) }'

#

iirc

fickle granite
#

sure, but ... so much syntax

uneven silo
#

yea

warm wolf
#

something like this works as well: gcloud config list project | grep -Po "(?<=project = ).*"

swift heron
#

google cloud is expensive

warm wolf
#

Compared to what πŸ€”

swift heron
#

Host sailor

#

digital ocean

#

You can’t call it β€œindustry leading” if another hosting also calls themselves β€œindustry leading”

fickle granite
#

gasp

#

someone is wrong on the Internet

fleet forum
#

hey

#

does anyone here run linux that can help me change from windows

#

i was planning to do so this evening

fickle granite
#

ugh

#

I use linux, sort of, but ... you're going to find it's a whole different world.

#

Almost nothing will work the way you expect 😐

#

I prefer Linux myself, but ...

fleet forum
#

yup

#

im prepared for that

fickle granite
#

(I haven't used Linux on a laptop in years, though)

fleet forum
#

ah

fickle granite
#

so if your questions have anything to do with the user interface, you should ask someone else

fleet forum
#

i was gonna ask if you could help make the switch from windows

fickle granite
#

depends on what you need help with

#

but my hunch is: no

fleet forum
#

ok

fickle granite
#

if all you do with windows is a web browser, and a bunch of electron apps, then it should be pretty easy

#

those work fine on linux

#

but if you have any apps that cost money, like Photoshop, or Microsoft Office ... prepare for pain

fleet forum
#

no

#

i code obviously, game a lot

#

have a bunch of text files

#

and image files

#

not my porn collection i swear

fickle granite
#

nossir of course not

#

gaming will probably never work

fleet forum
#

what

#

on linux?

fickle granite
#

but then not only don't I use linux on a laptop but I don't game either; so maybe I'm being too pessimistic

#

in my experience, linux is great for hard-core programming stuff, and terrible for everything else

pale marlin
#

^

#

though you don't game often, you're far from wrong

#

gaming on linux is a terrible experience still

fleet forum
#

as in

#

what makes it terrible

pale marlin
#

as in your FPS will be trash and 90% of games won't start

fleet forum
#

what

#

why?

pale marlin
#

because it's an entirely different OS?

fleet forum
#

but like

#

wtf

#

why would it decrease frame rate?

pale marlin
#

it was never built for gaming

fleet forum
#

and not boot shit

pale marlin
#

OpenGL vs DirectX, missing DLLs, the list goes on

fleet forum
#

is it a significant drop?

pale marlin
#

one of my games i used to run on high with 110 stable FPS dropped to 40 FPS on lowest game settings

fickle granite
#

you'll probably want to keep your windows box for gaming

pale marlin
#

^

#

i dual boot

fleet forum
#

i was hoping to dual boot

pale marlin
#

~300GB partitioned for windows (i play large games) and the rest of my TB is xubuntu

fickle granite
#

that sounds super annoying

#

but sure, if it works.

pale marlin
#

what, dual boot?

#

it's pretty simple honestly

fleet forum
#

id happily run dual boot, windows for gaming and linux for coding

pale marlin
#

set boot order to GRUB, choose which OS whenever you boot in

fleet forum
#

yeah

#

i just change boot order

#

and thats it

pale marlin
#

i give myself 10 seconds but you can set it to whatever you want

fickle granite
#

I imagine I'd hate the constraint of only being able to run one at a time. I mean, what if I'm gaming, and suddenly need to examine /etc/passwd ??

I'm 85% joking, but only 85%

main olive
#

your fps will be trash

any sources for this? I've experienced the exact opposite

fickle granite
#

I bet it depends greatly on the game

main olive
#

I boot into Linux to play source games because they just play a lot bettet

pale marlin
#

sources are me playing the game

#

and like offby said, depends

fleet forum
#

this doesnt say fps is trash

#

maybe

#

youre just trash at gaming

pale marlin
#

again, depends on the game

#

also if you choose to use wine it's a different story, but i hate the fact it's required

main olive
#

sources are me playing the game
so you're not stating facts, just anecdotal evidence that we're going to have to take your word for

fleet forum
#

csgo, arma, ravenfield, minecraft

#

these are the main 4

pale marlin
#

man xx you really must love linux

#

anyways, minus arma those should do fine

#

though arma should play nice with wine

fleet forum
#

well i dont play arma much

main olive
#

why yes, I do. Don't see how this is relevant, though

fleet forum
#

and its heavily modded

#

@main olive can u dm me?

pale marlin
#

i'm sorry for you then xx

fleet forum
#

if u can help me through the switch, i would be very grateful

main olive
#

sorry for what?

#

@fleet forum sure dude

fleet forum
#

life saver

eager snow
#

I made a simple folder organizer

#

It is on portuguese

#

But

#

The first option is 'organize folder', the seccond in 'Folder teleport'

#

The Organize Folder option works like that

#

The folder teleport

#

Is a while True and move all the files from the first folder to the seccond

main olive
#

@eager snow any reason you can't accomplish this with symbolic links?

#

nice job regardless

digital haven
#
find -E . -regex 'pdf'

i dont understand what's wrong with this, using on OSX

fickle granite
#

what are you trying to do?

#

if you're on OSX, and you want to find all the files whose names include .pdf, use mdfind -name .pdf

#

it's a zillion times faster than find

digital haven
#

oh, i've not heard of mdfind

fickle granite
#

it's a Mac-only thing

digital haven
#

hrm ok cool...i was just doing stuff like

find -E . -regex '^.*\.xlsx|^.*\.xls' -exec mv {} ./EXCEL_FILES \;
#

though there's probably a nicer way to do that πŸ€”

fickle granite
#

mdfind -0 -name .pdf | gxargs -0 -i mv -v {} ./EXCEL_FILES

#

although in that case, speed probably isn't very important

digital haven
#

i only want them in the current dir, and find is ( in this small case ) a bit nicer i guess because it's portable ( i think? )

#

should i be using xargs rather than -exec tho?

fickle granite
#

find . -type f -name '*.pdf' -exec echo mv -v {} ./EXCEL_FILES ';'

digital haven
#

why are we moving pdf files to excel dir here

fickle granite
#

find is only sort of portable; the version that comes with MacOS is annoyingly different from "gnu find"

digital haven
#

yeah i've hit a couple of bumps >:I

main olive
#

macOS coreutils are all pretty different from gnu coreutils

fickle granite
#

yep

digital haven
#

which sucks

fickle granite
#

an ancient historical split that has never been, and probably never will be, reconciled

main olive
#

you can install gnu coreutils via brew though

fickle granite
#

yep, that's what I always do, and recommend

digital haven
#

i think i tried that and still have old find

#

maybe i guffed it up

main olive
#

you need to update your PATH

fickle granite
#

you'll always still have the old one

#

what xx said

digital haven
#

ok fair - the find command i posted for xls etc seems reasonable? I'm wondering if xargs is usually recommended now

fickle granite
#

xargs works fine, but for simple cases you don't need it

#

just try your thing; either it'll work, or it won't

#

I doubt it'll blow anything up

#

πŸ™„

digital haven
#

it worked with warnings

warped nimbus
#

I have two separate inputs, newline delimited. I want to merge them together, strip them of duplicates, then read them into a bash array.

#

How can I do this?

#

I had readarray -t names <<< "${stuff}" before

#

doing "${stuff}\n${more_stuff}" didn't work

#

Well I need to pass "${stuff}\n${more_stuff}" to sort | uniq first and then put the result into the array, but I can worry about that later.

#

I can't figure out how to join them first

#

Managed to solve it using printf

south star
#

locate (slocate) is an indexed search available on linux, i suspect it's pretty similar to mdfind

fickle granite
#

waaay slower in my experience

#

I might not be making a fair comparison, but I use slocate on a cloud Linux system at work, and it's painfully slow.

#

Granted the disk is fairly large, but ...

#

laptop disk is 250G, and mdfind is pretty snappy ...

#

don't think the disk at work is all that much larger

#

I've wished there were some system that shoved all my local data up into elasticsearch, and let me search that way -- it'd really be faster

subtle pike
#

not sure if this is the right channel...does anyone know a simple way to increase Firefox's UI font size globally (as in throughout the app) on Ubuntu?

#

every time I install I forget how to do it

fickle granite
#

I'd assume it's something in the preferences

subtle pike
#

that's what I thought, too

fickle granite
#

I don't use Firefox, and I don't use desktop Linux, so ...

#

🀷

#

πŸ€·β€β™‚οΈ

main olive
#

There is a related post in #cybersecurity right now that linux experts can help me on maybe

fleet forum
#

hi

#

i recently got ubuntu

#

i have a couple questions

#

firstly, id like to figure out how to uninstall preinstalled applications such as firefox

#

secondly, im trying to install geforce experience but it uses a .exe file. whats the work around to this?

#

thirdly, can someone explain how to turn off the permission thing where you enter your password once you try to install something?

#

forth, how do i turn off blocking "potentially dangerous" applications from not running? im trying to get optifine on mc lol

warped nimbus
#

to remove a package use the command sudo apt-get remove package_name

#

I know for a fact Shadowplay is not supported on Linux for most graphics cards (due to a something like a proprietary API or codecs), in case that was the reason you wanted to get GeForce Experience.

#

There's no work around for that

#

But in general, it is possible to run exes with wine.

#

You shouldn't remove the root password prompt because that would make your system insecure.

fiery badger
#

Hello! I want to learn Unix-based development and i want to install a distro in dual-boot. What are pros and cons of Ubuntu vs Mint for statistics and python development?

long niche
#

Ubuntu and Mint will be pretty much the same in that regard imo. Most distros where you can install a recent python version and pip or something like anaconda will be very similar

#

I would say to try them both out and use whichever you like better. There's a few tools out there that will make a bootable USB drive that will allow you to run the OS without committing to installing it like Rufus and Etcher

south star
#

yeah, they are mostly the same thing, i'm not sure how relevant mint is these days, ubuntu is still my go to, you can always setup any linux distro to do whatever another linux distro can, anyway

main olive
#

I wanted to run multiple commands one after another.. because it was tedious doing this command by command

#

but this doesn't work

#
eval ssh-agent $SHELL && ssh-add ~/.ssh/gcp_jump && ssh-add ~/.ssh/gcp_sourceinstance
#

what am I doing wrong

#

it works.. when I have related commands like ssh add together.. but not when I have the eval command and ssh add together

long niche
#

I think maybe eval is trying to evaluate the whole command instead of just the part before the first &&

#

Not sure exactly how you'd write that as one command. Have you tried writing it as a .sh script and running that?