#unix

1 messages ยท Page 25 of 1

minor spear
#

ok thanks!

main olive
#

@grave jolt a switch, and a game cube adapter

#

Both have a male USB at the end, plugged into my laptop

heavy warren
#
test@LAPTOP-2RFK7PG7:~$ sudo apt install python-pip
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package python-pip
#

how can I get this to work?

#

nvm I just had to do sudo apt-get update

tribal cobalt
#

hi i messed something up on debian in the ssh config file

#

and now ssh won't start :/

#

is there a way to fix that?

#

i can only connect in VNC now

livid verge
#

which file? sshd_config?

#

@tribal cobalt just rename or remove the file and ssh will run with default settings

tribal cobalt
#

seriously?

#

let me test it.

#

It didn't work, why did you lie to me ๐Ÿ˜ข @livid verge

livid verge
#

it should work. The default file is just empty

#

let me test in my live server ๐Ÿ˜„

tribal cobalt
#

Ok

#

Command to delete it?

livid verge
#
root@nosklo.info:/etc/ssh# mv sshd_config sshd_config_backup
root@nosklo.info:/etc/ssh# invoke-rc.d ssh restart
ssh stop/waiting
ssh start/running
tribal cobalt
#

wait what

#

@livid verge

livid verge
#

is that sshd_config file the file you messed up?

tribal cobalt
#

i think so

livid verge
#

because you seem to have a different problem

tribal cobalt
#

What's the problem?

livid verge
#

yep, something else seems broken. Hard to fix without direct access to the machine; You might want to ask on #debian irc channel

tribal cobalt
#

If I Reinstall SSH

#

Will It Delete Anything On My VPS?

#

@livid verge

livid verge
#

things are already somewhat broken, so I can't give safe advice

#

Go ahead I guess, worst that can happen is having to reinstall

tribal cobalt
#

<@&267628507062992896>

rustic sky
#

what

tribal cobalt
#

if i reinstall SSH on debian it won't delete my files right?

#

i have files in /home/rabbit
and /etc

rustic sky
#

!warn @tribal cobalt Pinging admins is for programming help is not it's purpose, it's for requirement of administrator action. There is no express help because you ping.

shy yokeBOT
#

:incoming_envelope: :ok_hand: warned @tribal cobalt (Pinging admins is for programming help is not it's purpose, it's for requirement of administrator action. There is no express help because you ping.).

tribal cobalt
#

That's not in the rules...

dusty furnace
#

should be obvious.

#

but hey, now you know.

tribal cobalt
#

Sorry then, just upset i have to reset my server because i can't reinstall SSH

dusty furnace
#

there's no reason why reinstalling ssh would "delete your files" , no.

tribal cobalt
#

What Would It Change

gritty stirrup
#

It would delete ssh

#

@tribal cobalt whats the issue you are having? Id suggest we should start there

worn apex
#

@tribal cobalt you were in here yesterday (as @gilded sparrow if anyone wants to check the history) asking for some issue with the uname showing up on login - you said that the 10-uname file was empty, which seemed unlikely. Is it possible that whatever you did to look at the file deleted the contents?

#

anyway at this point probably just delete 10-uname

tribal cobalt
#

@gritty stirrup could you please help me fix this chat error

#

it's a consistent error. you fix it, but after a couple of messages, it happens again. something to do with the logs i suppose. can you just fix it for me and i won't have to trouble you again.

livid forge
#

why cant you reinstall ssh?

#

do you only have remote access?

stiff tiger
#

3
7h

I'm going through these instructions for setting this environment up : https://medium.com/@k_efth/deep-learning-in-arch-linux-from-start-to-finish-with-pytorch-tensorflow-nvidia-cuda-9a873c2252ed
but around this line at the end

https://gyazo.com/d65f7d20de7c2709722b4a5be254859f

nvidia-xconfig

im getting an error
https://gyazo.com/327675eb28dda156d13cf35c33f6d273

New X configuration file written to '/etc/X11/xorg.conf' ```

Medium

This article serves one purpose: I always end up searching for the same information when I install Arch so I need a guide tailored for myโ€ฆ

gilded sparrow
#

Guys

#

Help

#

I Used The "who" Command And It's Showing "Weeb" As Online

#

3 Times

#

When Only 1 Session On Weeb Is Running

warped nimbus
#

@stiff tiger that isn't an error.

tribal cobalt
#

Anyone Know How To Fix This

#
  File "/etc/chatt/run.py", line 3, in <module>
    from database import query, modify
  File "/etc/chatt/database/query.py", line 3, in <module>
    from utils import DATA
  File "/etc/chatt/utils.py", line 20, in <module>
    with open("config.json", "r") as file:
PermissionError: [Errno 13] Permission denied: 'config.json'
deft patrol
#

chmod +r config.json

tribal cobalt
#

It's There Tho..

warped nimbus
#

It looks for the file in the current working directory

#

Not necessarily where the script file is

main olive
#

@tribal cobalt , the two errors you pasted are different

#

if you've solved the first error, you can add absolute path to the config.json file

#

but it's weird if it doesn't work, if you haven't change anything else

tribal cobalt
#

@warped nimbus both files are in the same directory.

#

how do i make it not look for the current working directory then?

warped nimbus
#

Specify an absolute path to the file

#

Or just cd into the directory before you run the script

tribal cobalt
#

That's not possible

#

the user is already in a python script. when they type a custom command like "chat", the python script searches for python /etc/chat/run.py

#

so i need to add something to that script but idk what, any ideas?

warped nimbus
#

Then edit the script to have an absolute path to the config

tribal cobalt
#

how?

warped nimbus
#

To start, the error already tells you which file and the exact line the error is on

#

So go there

#

Then edit "config.json" to be the full path instead

tribal cobalt
#

what's the line that does that

warped nimbus
#

like "/etc/blah/config.json"

tribal cobalt
#

so i'm editing config.json

#

and adding what?

warped nimbus
#

No you edit the Python script

tribal cobalt
#

ok

#

gotcha

#

/etc/blah/config.json how do i make this full path

warped nimbus
#

I just explained how

tribal cobalt
#

you never gave me the line

warped nimbus
#

You just need to edit the path given to open()

boreal kestrel
#

The python file which loads config.json, which couldn't find config.json, and raised an error ... is listed in your traceback you pasted. It includes a line number too.

warped nimbus
#

I told you, the line is shown in the error message

#

It gives you the exact path to the Python file

#

and tells you the line number

tribal cobalt
#

but the script says this:

#
                        os.system('python3 /etc/chatt/run.py')
warped nimbus
#

Use the bottom-most part of the traceback, not the top

tribal cobalt
#

What Do You Mean By That?

warped nimbus
#

When you read the error, the bottom of it is where the error occurred. Everything above is the code that lead to the erroneous line

tribal cobalt
#

the error is open("config.json", "r") ?

warped nimbus
#

Yes

tribal cobalt
warped nimbus
#

Just gotta edit the "config.json" part

tribal cobalt
#

and change it to open("config.json") ?

warped nimbus
#

No it needs to be the full path

tribal cobalt
#

so /etc/chatt

#

config.json

warped nimbus
#

"/etc/chatt/config.json" or whatever the correct path is, IDK

tribal cobalt
#

ok

main olive
#

@tribal cobalt , which os are you using?

tribal cobalt
#

Debian

main olive
#

absolute path on linux starts with /

#

if you know where the config.json is located

#

cd into that directory, use pwd

tribal cobalt
#

@warped nimbus

main olive
#

what pwd returns + config.json is absolute path to the file

tribal cobalt
#

with open(/etc/chatt/config.json", "r") as file:

#

is this correct?

warped nimbus
#

Try it

#

Oh

#

Wait you forgot a quote at the start

tribal cobalt
#

Yes It Worked ๐Ÿ˜ƒ

#

But I Still Have A Chat Issue

#

:(((((((((((

warped nimbus
#

Probably best to move to a normal help channel as this hasn't really pertained to unix in a while

#

just state your problem there and someone will help out

main olive
#

yeah, I was having trouble finding this thread :)

gilded sparrow
#

Thanks @warped nimbus !!!!

#

๐Ÿ˜š

formal schooner
#

does anyone know why my screen might be going blank and unresponsive when i lock the screen?

#

i think it stays that way until it goes into a further power saving state like sleep

grave jolt
#

its possible that your lock screen is using different settings for your monitor that it doesnt support

formal schooner
#

hm. whats weird is, when i boot into debian the lock screen works fine

#

so i dont think thats it? i found a forum thread that offered a solution but i was afraid to try for fear of locking up my computer for 15 mins

#

also the person in the thread said none of it worked

#

they suggest a bunch of incantations i dont understand

grave jolt
#

boot in to debian as opposed to booting in to what?

main olive
#

how do I use ls to list full filepaths

#

in a directory

#

I tried to cat multiple files.. it didn't work v.v

#

files too large apparently

#

cat together multiple files into one I mean

#

oops.. got it.. apparently I didn't supply the path and it redirected output to where it couldn't be saved as such a large file

tribal cobalt
#

How To Disable Specific Characters?

#

Eg Atm Up Arrow = ^[[A

#

I Want To Ignore That Key.

#

On My VPS, I Only Want Letters To Be Accepted To Type In The Terminal

minor spear
#

is it possible to open a file picker from the python program? it will be quicker than typing the file location!

edgy minnow
#

subprocess should be able

cold rock
#

@tribal cobalt i did post something in #help-coconut for you that you may be able to adapt or use for the issue

#

you could probably modify it to fit your needs

velvet pilot
#

hey so does os.system not play sound or something?

#

I have this script and when I run it I don't get the screenshot sound like normal

import sys
import os
import datetime

_folder = "~/Pictures/screenshots"

filename = datetime.datetime.now().strftime("Screenshot %Y-%m-%d %H:%M:%S.png")

path = _folder + "/\"" + filename + "\""

args = ""
for arg in sys.argv[1:]:
    args = args + " " + arg

command = "gnome-screenshot -f " + path + "" + args
os.system(command)
#

OS is ubuntu 19.04 with GNOME 3.32.1

undone pulsar
#

@tribal cobalt PATH is a variable in unix systems that tells the shell where to find binaries

tribal cobalt
#

Ah

#

How's it used

undone pulsar
#

like when you run ls, or cat, the shell looks in PATH, finds the /bin directory, and sees that /bin/ls or /bin/cat exists, and executes those binaries

tribal cobalt
#

Ok

undone pulsar
#

The executable you're trying to run, sl, exists in /usr/games, which should already be in your $PATH variable

tribal cobalt
#

Ok

undone pulsar
#

So you could try just typing sl into your shell

tribal cobalt
#

bash: sl: command not found

undone pulsar
#

okay, in that case you'll have to add /usr/games to your $PATH using export PATH=$PATH:/usr/games

#

If you want this to happen automatically when you start bash, add it to your ~/.bashrc

grave jolt
#

@velvet pilot os.system might not be passing an environment to gnomescreenshot. you might look in to the shell parameter or using subprocess instead.
you also might switch to subprocess just so that you can capture the stdout and stderr

velvet pilot
#

I don't really care about stdout and stderr, sending them through the console is fine

#

since this is supposed to be called by a keyboard shortcut

grave jolt
#

you can use it to make sure gnome screenshot output exactly what you wanted, you dont have to show it to the end user

#

eg nothing if thats what it does when it works

velvet pilot
#

the thing is that the only end user is me and I don't plan on seeing it anyways

grave jolt
#

however its likely that if you dont run gnome-screenshot in a shell or other system for passing in an environment, it wont be able to find a ton of stuff

velvet pilot
#

so I really don't care

grave jolt
#

seeing what? I'm just talking about error checking

velvet pilot
#

seeing the output

grave jolt
#

sorry, i didnt mean show the output ever. I just meant you can check in your program that the output of gnome-screenshot is what you expected so that if it fails you can notify the user. otherwise when it fails you are just going to get nothing if you bound it to a key

velvet pilot
#

so I changed it to subprocess.call(command, shell=True) and it still doesn't make the sound

grave jolt
#

to know why, you prob need to check the output of gnome-screenshot's stdout and stderr

#

even if its just for debugging right now

velvet pilot
#

there is nothing in either of them

#

it works otherwise than the noise

#

it just doesn't make the sound it should

grave jolt
#

can you use subproccess etc to run pulse audio cli tools without error? eg like pactl

velvet pilot
#

can you give an example command I could try?

grave jolt
#

i think pactl set-sink-volume 0 20% would adjust your volume to 20%

velvet pilot
#

no output in stdout or stderr and it sets the volume

grave jolt
#

hmm not sure why its not making sound then. i peeked in the gnome-screenshot source and it doesnt seem to have any thing that would check if its in a terminal.

#

potential things to look in to it uses some sort of generic name for sounds that are defined by XDG and it uses libcanberra to play them, so maybe somehow thats not getting the env it needs

oak shell
#

os.system("gnome-screenshot") makes a sound for me

#

and env -i DISPLAY=$DISPLAY gnome-screenshot does too, so it doesn't necessarily need anything but the DISPLAY variable to run

velvet pilot
#

when I do the second one from my terminal it spits out a bunch of errors about perms and segfaults

#

oh weird

#

os.system("gnome-screenshot") makes the sound in interactive

#

huh, and if I have a file that just does that

#

weird, apparently gnome-screenshot doesn't make a sound when you run it with -f

oak shell
#

Ah, that's right.

#

-f suppresses the sound effect for me too

main olive
#

if i have an vps, how can i make code to run 24/7 ? i want to close the ssh client and pc

#

unbutu 16.04

#

whats the best thing to start with python 3? where can i start
i already know the very basic things

edgy minnow
small glacier
#

No, you probably want to create a service/startup script

#

Cause you don't want to run it manually

oak shell
#

systemd service is what you want for stuff that runs automatically and all the time in background

main olive
#

and how can i close it

#

i do it

#

and after

#

i can`t close the script

oak shell
#

as service? or in screen?

main olive
#

screen

#

i do

#

screen

#

python3.7 script

#

and i want to close it

#

and when i start vps

#

i do

#

ctrl a "

#

and i don`t find

#

the script to close

warped nimbus
#

ctrl + a then ctrl + d

#

to exit out of screen

#

If that's what you mean

oak shell
#

ah, I never really use screen personally

warped nimbus
#

To kill the screen there's a command-line switch for the screen command which I can't remember right now...

main olive
#

script is still online

#

and i do it

#

until i close my vps

#

script is still on

warped nimbus
#

Does screen -ls show any sessions?

main olive
#

3

#

how to close all?

warped nimbus
#

Had to look it up since I can't remember

main olive
#

i found

#

screen -r sesion

#

and after

#

ctrl a

#

ctrl d

warped nimbus
#

All that does is restore the session and then leave it again

#

If you want to kill the session use the screen -XS session# quit command

livid forge
#

yea ctrl + ad is for detach

tribal cobalt
#

guys what is enter key and space key in unix

#

because i have a python script to detect words, but what do i type for the enter key and space key?

#

like ctrl c is ^C

#

what do i put for enter and space keys

rustic sky
#

can we see some code?

#

we have no idea what you are looking for by "enter and space key"

#

we need to know how you are handling other things @tribal cobalt

tribal cobalt
#

sure

#

@rustic sky

#
                        print('This command is not allowed')```
#

i need one for ctrl c, SPACE key, and enter key

#

but i don't know what to put

rustic sky
#

where is comm coming from

tribal cobalt
#

wdym

rustic sky
#

where is comm defined

tribal cobalt
#
        except: comm = "lol"```
rustic sky
#

you can't catch ctrl+c, space or enter with raw_input

#

what is your use case? what are you making?

tribal cobalt
#

i am making a kind of restricted shell

#

that only specific commands can be run

#

but it's buggy with the ctrl key

#

users can simply just exit out of the script or even just make it not recognise their commands anymore

rustic sky
#

you can't catch control characters with an input.

tribal cobalt
#

what would i use?

rustic sky
#

It's a lot more complex

tribal cobalt
#

:/

rustic sky
#

you have to disable echo in the tty options for spaces so you get every character and then you'll have to write some sort of buffer system to handle commands

tribal cobalt
#

if i disable echo

#

will it make any issues?

rustic sky
#

it'll mean you have to handle all control of the shell

tribal cobalt
#

someone told me to type Sysdig in terminal

#

it looks bad

rustic sky
#

uh what

#

sysdig is a troubleshooting tool

#

why are you running sysdig

tribal cobalt
#

oh

#

idk he told me to

rustic sky
#

ok so general advice here don't run commands from the internet unless you understand what they do

tribal cobalt
#

because i made this and it's not saving logs, so he's helping me

isFirstTimeRun = input("Is this the very first time you run this script? Enter $
if (isFirstTimeRun == 'y'):
    print('Downloading and installing sysdig package')
    os.system('curl -s https://s3.amazonaws.com/download.draios.com/stable/inst$
    os.mknod('/.serverlog')
if (isFirstTimeRun == 'n'):
    os.system('cd /')
    print('writing logs to: /.serverlog')
    os.system('sysdig -c spy_users >> .serverlog')
    os.system("tail -f /var/log/auth.log | grep 'sshd' >> .serverlog")
rustic sky
#

what is this script for?

tribal cobalt
#

for logging connecting

#

when users connect to the server

rustic sky
#

spy_users?

tribal cobalt
#

it's supposed to save logs to /.serverlog

rustic sky
#

top is not going to be useful

#

this seems a little too dangerous to help with here, seems like it could be used for unsuspecting surveillance.

oak shell
#

what are you even trying to achieve overall? what is all this stuff you asked the last couple days good for?

gritty stirrup
#

Its a ssh app server

oak shell
#

I feel like you're either totally overcomplicating something, or completely underestimating the size of what you want to do

gritty stirrup
#

He wants to log all the users that use it

tribal cobalt
#

no sharp

#

it's not

gritty stirrup
#

o o f k

tribal cobalt
#

yea XD

#

there's already a log in the chat silly

#

this is for users who connect and disconnect form the vps

#

but i don't trust the person who is "helping" me

#

he knows i'm a noob

rustic sky
#

sshd already has logs

gritty stirrup
#

Its a app

#

With lots of different sub-python scripts

rustic sky
#

for sshd?

#

ah

#

hm

gritty stirrup
#

Yes. you log in, and it loads the terminal app up

tribal cobalt
#

ssh

gritty stirrup
#

sshd = ssh in this case

oak shell
#

why would you give people access to your vps who you don't trust?

tribal cobalt
#

as soon as someone connects to my vps, i wanna see it.

rustic sky
#

sshd can do that for you

tribal cobalt
#

@oak shell because i have a python script that only lets them do specific commands

#

how joe?

oak shell
#

that will most likely fail

rustic sky
#

you already have it in your code.

tribal cobalt
#

it's not working

#

it's empty :/

rustic sky
tribal cobalt
#

yes not working

rustic sky
#

yes because you don't understand what it is doing

#

making a sandbox is hard, making a sandbox that is safe is harder

#

you are re-implementing things in an unsafe way

tribal cobalt
#

i should just install honeypot right?

oak shell
#

what

grave jolt
#

if you dont trust them dont let them on the system.

livid forge
#

cant you just whitelist commands by only giving them +x access to a symlinked bin directory?

#

and im sure theres better and/or more complicated ways to implement, but what riff said is correct

median swan
#

what do people do for SSH keys? do you have one per client-device/host-device pair? or one per client? or one per host?

#

or one key to rule them all ๐Ÿ˜„

boreal kestrel
#

Depends on your security posture. A lot of people have one key to rule them all

median swan
#

hmm ok

oak shell
#

technically key reuse is like password reuse, if your key gets leaked somewhere for whatever reason, people get access to everything the key is used for

#

so it's IMO okay to reuse one key within the same infrastructure, e.g. if you have a cluster of equivalent machines where having access to one is just as bad as having access to all of them

#

otherwise, for different and unrelated services like a VPS and your GitHub, it's better to separate them

#

you can specify in your ssh config which key to use for which host

boreal kestrel
#

If you're directly using ssh or you can influence what flags are sent to it, you can also specify the exact key using -i command-line parameter.

If you're interested in being secure, there's a ton of things to consider for ssh, including and especially whether or not you have agent forwarding or X11 forwarding enabled

median swan
#

right, I've been using diff keys for diff clusters of services so far

#

I think I'll stick to that and consolidate access to a couple groups maybe

#

quick question: is there a quick way to test ssh transfer speeds?

boreal kestrel
#

iperf3 with port forwarding is pretty quick

#

depending on the port forwarding direction, you'll need to pass either -R or -L to ssh options. Or look at PortForward RemoteForward or LocalForward ssh_config options

median swan
#

cool, will take a look. thanks!

odd hollow
#

lol i also have a question about ssh and port forwarding

#

i set up port forwarding for a port and added it to the sshd_config file, then reloaded the ssh service

#

but i cant connect to ssh from the forwarded port

#

i tested the port forwarding on the external port with https://www.yougetsignal.com/tools/open-ports/ and it works, and ive tested sshing into the machine on the local network using the new internal port and that works, but i cant ssh through the forwarded port into the new port

#

this is raspbian on raspberry pi

boreal kestrel
#

@odd hollow I'm not sure I understand

odd hollow
#

port forwarding works

#

ssh to a port other than 22 works

#

port forwarding to the new ssh port does not work

boreal kestrel
#

Again, I'm not sure I understand. You say "port forwarding works" and then you say it does not work. What are you doing? What do you want to do which isn't working?

odd hollow
#

forwarding to the ssh port and then trying to ssh through it does not work, but i know that the port forwarding itself is working because i tested it with https://www.yougetsignal.com/tools/open-ports/

boreal kestrel
#

How are you forwarding the port?

odd hollow
#

upnp's igd-pcp

#

i got a 200 from the igd

#

and it lists the mappings correctly when i request them

boreal kestrel
#

Ahh there's the confusion. You're not forwarding via ssh. I don't know how upnp works: I disable upnp on my network.

odd hollow
#

ssh is over tcp right?

boreal kestrel
#

Yes.

odd hollow
#

i forwarded tcp

boreal kestrel
#

k. that doesn't mean you're forwarding via ssh.

odd hollow
#

oh

boreal kestrel
#

that just means that some other service, I assume your router, is doing the forwarding

odd hollow
#

yeah im forwarding from my router to my computer

boreal kestrel
#

you probably have a firewall rule somewhere that blocks port 22

odd hollow
#

its not on 22

#

i put it on 2222

#

well externally its something like 63xxx and then internally its 2222

boreal kestrel
#

in the sshd_config you set ListenAddress :2222 and restarted the ssh daemon/service?

odd hollow
#

um i did Port 2222 i think

boreal kestrel
#

see man sshd_config, you need to set ListenAddress

odd hollow
#

oops

#

thank you

boreal kestrel
#

although I guess Port is documented too, but I've always used ListenAddress since it's more explicit

#

and you probably still need to update your firewall configuration

analog hornet
#

@shut harbor you do any stuff with WSL?

#

looking into which distribution to use so I can use rllib

shut harbor
#

Unfortunately no @analog hornet

analog hornet
#

RIP, that's unfortunate

#

Iโ€™m looking for a Linux distribution to use in conjunction with WSL to download and use some python machine learning packages. are there any recommendations here outside of Ubuntu or Debian

white solar
#

Xubuntu
Arch/manjaro maybe?

tribal cobalt
#

hi

#

when i login to SSH debian

#

it says login as: and (IP) password:

#

i'd like to change it to Username: and Password:

#

how do i do this

livid verge
#

completely unrelated to python

#

those prompts are part of your ssh client, not the server

livid forge
#

and before you ask

#

do not do not do not write a wrapper for that

quasi pike
#

So you're saying no to my wrapper idea then

main olive
#

I am testing out different Linux distros right now

#

I tried Ubuntu, and I am thinking of trying Fedora

#

How do I figure out what is the best distro for my use case?

#

Right now Fedora is on a bootable USB stick right now, but it doesn't seem to want to boot.

#

Everytime I restart, it just brings me back to Ubuntu.

#

I used Rufus to write Fedora onto the USB stick.

#

What am I doing wrong? Am I supposed to hold down F2 or something?

oak shell
#

did you compare the hash sums of the downloaded iso before flashing it?

main olive
#

No, how do I do that?

oak shell
#

also is the boot order in BIOS correct (USB before HDD)? Alternatively there might be a manual boot device selection menu that doesn't change the settings but is just for once

oak shell
#

on Ubuntu, you can just type e.g md5sum /PATH/TO/DOWNLOADED/FILE.iso to compute the file's hash

#

or sha256sum is what you need in this case

#
# Fedora-Silverblue-ostree-x86_64-Rawhide-20190524.n.1.iso: 2256076800 bytes
SHA256 (Fedora-Silverblue-ostree-x86_64-Rawhide-20190524.n.1.iso) = c03640c46391c68068b863bea8d2879c3ac2f81158e2959843c265f57cc6a54c
#

the output should be the same long alphanumeric string like there (c036.......a54c)

#

if it is different, the iso file got corrupted during the download and you have to download it again

main olive
#

well uhh

#

you see

#

I wrote it on a different computer

#

How do I check the sum on a windows computer?

oak shell
#

I think you can use certutil...

main olive
#

ok... it seems to be working

#

c03640c46391c68068b863bea8d2879c3ac2f81158e2959843c265f57cc6a54c
c03640c46391c68068b863bea8d2879c3ac2f81158e2959843c265f57cc6a54c

#

yup

#

its fine

#

tis working

oak shell
#

good, then it's probably the boot order

main olive
#

So what do I do?

oak shell
#

you have to check that in your bios settings, or find a boot device menu outside these settings

main olive
#

How do I do so?

oak shell
#

normally you have to press an F* key or DEL or something like that while the manufacturer logo shows up after turning it on

#

depends on your device

main olive
#

what if the manufacturer's logo doesn't show up

#

wait I got it

#

how do I change boot order from here?

oak shell
#

no idea, each of these setup menus looks different

#

normally there's a menu labeled boot or something

main olive
#

there is

oak shell
#

and in there a submenu about boot device order

#

there you have to make sure that whatever your usb stick gets identified as is before your internal hard disk

main olive
#

with:

Boot Mode [UEFI]
Fast Boot [Enabled]
USB Boot [Enabled]
PXE Boot to LAN [Enabled]
IPV4 PXE First [Enabled]

EFI
Linpus lite (Patriot Memory {the name of my usb boot stick})
oak shell
#

can you select the usb stick and do something with it?

main olive
#

nope

#

its just there

oak shell
#

๐Ÿคท dunno then

main olive
#

fast boot says "sets the BIOS to boot only from a built-in HDD (SSD)"

#

should I disable that?

oak shell
#

yeah, try disabling it

main olive
#

uhh

#

oh thingy

#

new menu

#
Install Fedora Rawhide
Test this media & install Fedora Rawhide
Troubleshooting -->
#

prolly test

#

well there was imeediately an error for the first few lines

#

but it seems to have worked anyways

livid forge
#

btw rawhide is the test branch

main olive
#

whats that thing called..

#

where you can run commands and resume when you want to

#

tmux

#

yeah

#

got it

vagrant rune
#

You can also use screen

green fog
#

^

main olive
#

i know rawhide is the test branch

#

Now I want to try the normal branch

#

so I rewrote it

#

using the FedoraMediaWriter and stuff

#

plugged it in

#

restarted

#

and... it did not open the installer again

vestal turret
#

You need to tell it to boot the usb stick in the bios.

main olive
#

well it worked last time

#

I don't know what I did differently

vestal turret
#

You can get there using systemctl reboot --firmware-setup

main olive
#

oh thanks

#

ima try that

#

Cannot indicate to EFI to boot into setup mode: Access denied

#

I tried sudo

vestal turret
#

if that doesn't work you'll just have to do it the old way.

#

Pressing a button during boot.

main olive
#

oh that menu again

#

alright

#

im assuming boot menu

vestal turret
#

Yes

main olive
#
Boot Mode [UEFI]
Fast Boot [Disabled]
USB Boot [Enabled]
PXE Boot to LAN [Enabled]
IPV4 PXE First [Enabled]

EFI
Fedora (SAMSUNG MZVLW128HEGR-000L2)
Fedora (SAMSUNG MZVLW128HEGR-000L2)
vestal turret
#

If your usb stick isn't seen there you might need to reinstall the usb

main olive
#

ok

#

umm

#

well I did that

#

multiple times

vestal turret
#

your system doens't seem to recognize it as something bootable though

main olive
#

hmm

#

so should I reinstall the ISO and rewrite it?

vestal turret
#

Yeah, what are you using to write it.

main olive
#

fedora media writer

vestal turret
#

That should be fine

main olive
#

ok

#

I wrote it

vestal turret
#

how big is the iso you wrote?

#

have you verified it's checksum?

main olive
#

2 million kb

#

and uhh shoot

#

right

#

d00e9a77623faa5504537d63e4d4a1767dcd3e162fdfdced7ebc6cb1aac14936
d00e9a77623faa5504537d63e4d4a1767dcd3e162fdfdced7ebc6cb1aac14936

#

well its good

vestal turret
#

so it should work now

main olive
#

ok

#

my pc is powered off

#

I plugged it in

#

im going to power it off

#

do I need to f2 or no?

vestal turret
#

go to the boot menu yeah

main olive
#

ok

#

hey its there

#

do I just exit

vestal turret
#

select the usb from the menu and boot it

main olive
#

I cant select it

#

it just flashes if I hit enter

#

like its loaded something

#

and then nothing happens

vestal turret
#

I'm not sure how to go from there.

main olive
#

maybe its like

#

it loads

#

and then I exit

#

like it doesnt exit automatically or soemthing

#

should I exi?

vestal turret
#

where are you now?

main olive
#

InsydeH20 setup utility

#

the boot menu

vestal turret
#

And is the usb visible?

main olive
#

yes

#

and I clicked on it

vestal turret
#

Can you select it?

main olive
#

it did a little flash

vestal turret
#

is there a button that says boot override?

#

These things all look a little different from eachother

main olive
#

aww thanks google

#

AYY

#

that works

#

ish

#

oh nevermind

#

it worked

main olive
#

I wanted to copy a directory to another..

#

just did cp and didn't work.. until I added -R

#

what gives?

hazy spruce
#

The -r flag tells the file system to recursively roll down the file/directory tree and copy any & all contents that might be a โ€œchildโ€ of that file to a new place.

robust cave
#

@main olive man <command> takes you to the man page (manual), and is very helpful for understanding flags

#

to search for flags in the man page, in cases where there are a bajillion flags, press / then type the thing you want to search for

#

if there are multiple matches, n moves the cursor to the next match, and shift+n moves it to the previous match

main olive
#

I read the man.. it said recursively search .. I thought it was for subdirectories and not files

#

presumed that cp would copy entire directory without the -R

main olive
#

why do online man pages look so bad

#

where does the /tmp reside

#

is it like temporary folders on windows..

robust cave
#

/tmp is the absolute path

main olive
#

ooooh cool cool

warped nimbus
#

How could a file descriptor be created in Python and then shared with another process e.g. via subprocess?

#

My basic understanding of fds is that each process has its own fds

#

os.set_inheritable looks promising

#

or doing some hacky shit like getting the pid of python and using proc/pid/fd rather than /dev/fd

main olive
#

how about <(command) argument

#

in shell..

warped nimbus
#

I have to use subprocess cause I need to capture stdout and stderr from the process

#

but the process is a tool that has some options for specifying a file descriptor for logging

#

Anyway I may be onto something with Popen's pass_fds

#

Well I got the fds to show up in the child process but it fails to write anything to them

robust cave
#

you can get the file descriptor from IO objects using .fileno(), would that help?

with open("test.txt", "r") as f:
    print(f.fileno())
warped nimbus
#

That was like one of the first things I tried

#

Thing is I didn't want to create a file

#

so I use os.pipe()

#

Here's my current code ```py
import subprocess as sp
import os

r, w = os.pipe()
os.set_inheritable(r, True)
os.set_inheritable(w, True)
p = sp.Popen(
["nsjail", "--log_fd", str(w), "--", "ls", "/dev/fd"],
# ["ls", "/dev/fd"],
text=True,
stdout=sp.PIPE,
stderr=sp.PIPE,
pass_fds=(r, w)
)
stdout, stderr = p.communicate()
print(stdout)
print(stderr)
print(p.returncode)

with os.fdopen(w, "w") as log:

log.write("fuck")

with os.fdopen(r, "r") as log:
print(log.read())

#

At this point idk how to debug it since it's interacting with a completely different program

#

and it's especially hard since I break that program's logging by specifying the log_fd

#

all I get is a return code to work with now

#

I could just give up and create a temp file to log to...

solar garden
#

Hey, are there programms which can restart other programs when they crash?

#

Other program = Python Script

solar garden
#

Nobody can help?

main olive
#

I don't think a program can do anything except close when it crashes

#

Although you could have kinda like a daemon to see if a program closes unexpectedly and do stuff

finite moat
#

Depends on the nature of "crash".

#

But yeath, the most straightforward is just keep python script running and checking if your program of interest is running, then restart if it doesn't.

solar garden
#

Thanks. I'm searching for something like pm2 for node.js

finite moat
#

Never used that one, but supervisord did rather well for me until I switched to docker.

solar garden
#

What's docker?

finite moat
#

Thin layer of virtualization technology.

#

Pretty powerful stuff for production deployments.

#

And for local development, for that matter. But is fairly in-depth.

solar garden
#

OK, don't think that I'll need this

grave jolt
#

@solar garden if you are on a distro running systemd, it supports restarting services automatically if they fail. Its not a bad idea to use the os's service management in general when you can

solar garden
#

That's late, but thanks!

main olive
#

ssh user@ip

livid verge
#

not all users in passwd have passwords defined

#

some users can also be restrained from logging in in multiple ways

#

setting the shell to /bin/false is a common way

main olive
#

You are using a gui?

frozen summit
#

yea

main olive
#

I thought you were using terminal
I am out

frozen summit
#

but i hopped over to putty and it doesnt allow me to ssh using root user

main olive
#

Access denied?

grave jolt
#

the sshd config has a setting to explicitly disable logging in as root

#

check the logs on the server

#

you can also use ssh -v or ssh -vv to get more details about what stage its failing on

main olive
#

Also, ssh might not work if you have router settings blocking that kind of connection

frozen summit
#

hmph i've already changed permitrootlogin to yes

grave jolt
#

the transferring ssh keys to the vm screen makes it sound like a server side issue. if they dont have a home dir for example then maybe it could fail

#

i would def check the logs

#

looks like the permissions and owner settings on the ~/.ssh files is wrong

#

you need to make them owned by that user, also grouped in to that users specific group, then you can set most of the files to i think rw for the user and nothing for all other users

#

so group / other would have no permissions

#

and thats the folder and each file i think too

#

technically some of the files can have more relaxed permissions but that should be an easy enough fix

#

from the ubuntu wiki:

chmod go-w ~/
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys```
#

Yeah if you can log in as that user / use su to switch to them somehow then you can run those settings. Otherwise as root you would have to specify the exact path instead of using ~

#

Yeah you have to either be root or that user

frozen summit
#

but how do i log on as that user? @grave jolt previously, i used ssh gui through google cloud and there wasn't any issue on the first login but not able to do so on the subsequent logins

main olive
#

Note to self: Don't use google cloud services, they seem like a pain

frozen summit
#

indeed they are... KMS

analog hornet
#

I'm trying to use WSL to download / use packages with python. Should I be running python out of the debian install or am I still running it off the windows installation?

steel verge
#

Any professional Linux Administrators around? Are you using Python to automate things? Do you prefer bash? Or a combination of both? Would love to hear your professional experiences. Reason I ask is, because I am starting a new job as Linux Administrator in July, where I am supposed to automate the server landscape of that company and I am thinking about a strategy. I would tend to use only bash scripts, because it is native, but then, Python can be a great tool.

formal schooner
#
echo 'a' > a
echo 'b' > b
echo 'c' > c
echo 'd' > d

tar -c -f ab.tar.gz a b
tar -c -f cd.tar.gz c d
tar -c -f abcd.tar.gz ab.tar.gz cd.tar.gz

tar -x -O -f abcd.tar.gz | tar -x ab.tar.gz

why does this give me an error saying ab.tar.gz isn't in the archive? i would expect that it extracts the files a and b from ab.tar.gz

grave jolt
#

@frozen summit if you can access root you can use the su command to log in to a specific user. eg su - usernamehere the - by itself tells it to switch your environmental variables like HOME too I believe.

#

@formal schooner

 tar -x -O -f abcd.tar.gz | tar -t
a
b```
that shows a and b are indeed in the file however you do: `tar -x ab.tar.gz` which tells it to extract ab.tar.gz from that archive, which has only a and b in it
leave off ab.tar.gz and just have `tar -x` and it extracts 'a' and 'b'
formal schooner
#

thats confusing because tar -x -f abcd.tar.gz does indeed extract ab.tar.gz and bc.tar.gz

#

at least in my testing it did

#

oh

#

hold on.... is tar -t just processing the first tar file that it gets on stdin?

#

so tar -x -O -f abcd.tar.gz pushes out 2 concatenated tar files, right?

#

but when that's piped back into tar, it's only processing the first?

grave jolt
#

Ah yeah that's prob what's happening. It reads the first header and then just considers itself done

#

You'd prob need to loop over the list of files and extract each one individually

#

Loop over abcd.tar.gz's files

formal schooner
#

i see yeah

#

thanks

warped nimbus
#

@steel verge My non professional opinion is that bash is very cumbersome to use for any script of significant size

grave jolt
#

@steel verge I would switch to things like ansible/chef/puppet for sure. you should almost never need to write a whole bash script for just normal operations imo.

cosmic brook
#

Hello people! Who can help me with ubuntu server?

#

Please ping me when you write.

oak shell
#

@cosmic brook Just post your question here, don't ask to ask...

cosmic brook
#

Okay, later.

tribal cobalt
#

Hi I Get This When I Login, And Have No Idea What's Causing It...

tribal cobalt
#

Any Solution?

steel verge
#

@tribal cobalt Have you taken a look into your .bashrc?

tribal cobalt
#

Yes there's nothing in there, it seems to be on every user.

steel verge
#

so it's absolutely empty? I doubt it tbh

#

.bashrc is what is executed after a login

#

try to move it to a different name and see if it pops up again

#

and .profile

#

And if ~/.bash_profile exists, it overrides .profile. So those are the files you need to search for an answer

#

is it always the same number?

cosmic brook
#

Hi! I have a problem with python3.6/3.7, my command is:

# python3 discord.py

And i have error:

Traceback (most recent call last):
  File "discord.py", line 1, in <module>
    import discord
  File "/home/fsmil/fServer/bot/discord.py", line 2, in <module>
    from discord.ext import commands
ModuleNotFoundError: No module named 'discord.ext'; 'discord' is not a package
#

And i have installed module with command:

# pip3 install discord.py
# pip3 install discord
zinc bobcat
#

You can't name your file discord.py

cosmic brook
#

Why?

zinc bobcat
#

Because module import is given preference to files in the current directory

cosmic brook
#

Okay, try...

#

Real work, thnk's you!

#

But I still have this error with telegram bot.
(file name: bot.py)

cosmic brook
#

@zinc bobcat, you can help?

tribal cobalt
#

@steel verge It Has Nothing To Do With Bashrc

main olive
gritty stirrup
#

@main olive That's within a python repl

#

You can't run commands inside there

#

Only python code

main olive
#

Oof

#

Okay

white solar
#

>>> means it is python shell

main olive
white solar
#

sudo apt-get install pip3

#

if you use py3

main olive
#

I primarily use Python3

#

I had to use Py2 recently because it has the ScrolledText module, plus other stuff

white solar
#

then install pip2 and pip3

#

pip3 for py3 modules

#

and pip2 for py2

main olive
#

Does pip include modules, or is it just for downloading modules?

white solar
#

pip is a tool for installing modules

main olive
#

Okay, thank you

#

And I would assume I would run it as root

white solar
#

not really

#

well you can if you want to install modules for all users

#

and for the whole system

vestal turret
#

Don't run it as root unless something really requires it.

white solar
#

^^

gritty bobcat
#

Anyone know why matplotlib might not be installing properly? It crashed my pi the first time, now it's just stuck on "using cached "http....."

main olive
#

so emojis

#

Fedora works and I love it

#

but emojis

#

on Windows its fine

#

but the emojis load weird here

#

like some emojis look nothing like before

#

how do I set the emojis used?

floral dove
#

how do I get started with linux?

gilded basalt
#

Then install Ubuntu (or Mint, up to you) ๐Ÿ˜‰

#

There are also a lot of good YouTube tutorials out there

#

Modern linux distributions ("distros") have good or great graphical user interfaces (GUIs), so you can install Ubuntu, Mint, Fedora, etc. and it'll feel a lot like Windows

#

If you want to unlock the true power and level up as a developer, though, you'll need to start learning terminal commands

main olive
#

Corey Schafer has a bunch of videos

#

you can skip the mac ones..

oak shell
#

that covers the basic of many foundational topics that you might need to administrate a Linux machine, including servers

#

For desktop usage, depends on the DE you pick, but that part is mostly intuitive.

main olive
#

I use Mint, it is good for everyday use
However, there are better distros if you are a developer, IT, etc.

#

But for the most part, it is personal preference

tribal cobalt
#

on my vps, i wanna make sure there's no way a user can see the files on my vps, but i only know of a few protocols, like sftp, scp, etc... i want you to disable every single one so there's 0% chance the users can't see files on my server

#

is this possible?

green fog
#

Setup a firewall and block everything except the things you need

#

Iirc udp is one of them

tribal cobalt
#

Ok

green fog
#

UFW, my mistake

tribal cobalt
#

i'm using rbash as a restricted shell, how do i change the location of it and put the commands i want the user to be able to use in a /bin directory?

floral dove
#

Linux vs windows vs macos

#

Pros

#

Cons

#

Etc

#

?

vast topaz
#

Choosing for yourself? Windows is pretty good these days, especially with Windows Subsystem for Linux

warped nimbus
#

Price is one factor

#

linux is free ๐Ÿ˜ƒ

#

Windows is affordable and works easily with most consumer hardware you put together

#

macOS requires Apple only products, which are pricey

warped nimbus
#

@umbral cargo How did you make your user sudo?

umbral cargo
#

usermod -aG sudo username

#

Switched to user then by running su - username, checked if I was root, & it worked out

#

But now I can't SSH

warped nimbus
#

Did you name your group sudo?

#

Oh nvm

#

It's the file that's called sudoers not the group I believe

#

I can't think of what could have gone wrong by simply adding a user to a group GWeggmoteThonk

haughty verge
#

Can you post your /etc/sshd_config file?

warped nimbus
#

That would be /etc/ssh/sshd_config actually

haughty verge
#

Yeah that

umbral cargo
#

Ahh I figured it out either way, anyways ty for the help blobcatgoogly

#

By figuring it out, it means I switched to root & edited directory & sub folder perms to allow my main user to write to them, instead of actually figuring it out, but too pre-occupied with my current program to try & bother figuring it out

warped nimbus
#

Which directories? The one with the ssh keys?

#

The user you're trying to log in as should own that directory

#

And you shouldn't be sharing root ssh keys with other users, if that's what your solution was

steel verge
#

The most important thing to know about password-less ssh is, that ~/.ssh can't have group permissions. So if you add a group to your user, it might add group permissions to your home directory recursively and then you can't ssh anymore. The most anal are actually Synology NAS. I had to chmod 700 the whole ~ directory before passwordless would work.

tribal cobalt
#

i'm trying to change the path variable to a user so when they login, only specific commands i set can be run... how do i do this?

warped nimbus
#

? Please don't "arbitrarily" ping helpers

tribal cobalt
#

sorry.

worn apex
#

that is actually a very hard question in security

#

probably the easiest way is to not change the path variable (or otherwise try to restrict things on that end with a normal shell - changing the path won't work but a chroot could in theory), instead create a custom login shell for them

#

i can't walk you through that now thouh

analog hornet
#

I'm trying to create new files for jupyter3 notebooks on WSL. I'm getting: An error occurred while creating a new notebook.
Permission denied: Untitled.ipynb

#

This is coming after creating a new notebook in localhost:8888

tribal cobalt
#

i'm trying to change the path variable for a user on my debain vps, so when they login, only specific commands i set can be run on the restricted shell... how do i do this?

#

i was thinking of using rbash, but even still, there's commands that a user can use to escalate.

grave jolt
#

path cant do that, they can just edit their own path or directly execute the commands.
you need a chroot at minimum or container ideally

odd hollow
#

Are there disadvantages to installing full blown Debian on an rpi

distant prawn
#

afaik it doesnt run on an RPi without patches

#

unless they changed that

#

looks like they did, but it still has issues

#

afaik there is no advantage to not using raspbian

haughty verge
#

Use Yocto ;3

marble sentinel
#

Hi guys, im doing a opencv project using the rasp-pi and i need more control over cpu time

#

Disabling desktop environment helped a ton

#

Im wondering what more i can do

main olive
#

Youtube videos wont load, I am on Fedora 30 Workstation

#

Its confusing, if I look online its only firefox, and none of the answers work

#

if I hit the little htm5, it says my browser is up to date and theres nothing that needs to be done

#

if I look in software for this one gstreamer package, it isnt installed

#

but if I try to download it I get first a popup telling me to enable third party repos

#

then afterwards, trying to download says "this repo is already enabled" and it wont download

warped nimbus
#

@marble sentinel Try a lighter distro. Or is that what you already did when you disabled the desktop environment?

marble sentinel
#

Well, the thing is i have no idea what kind of 'OS dependencies' my code has

#

For example the images are beeing processed on the pi's GPU, I'm also calling picamera functions

#

No idea what I'd need installed to make sure that works

#

Im running headless stretch

warped nimbus
#

Usually docs tell you what dependencies are needed. Also, the errors may be descriptive enough

#

But honestly idk how much CPU you'd save anyway

#

You save disk space more than anything else

marble sentinel
#

Yeah its pretty consistent right now

#

My cpu times

#

Before/after headless

warped nimbus
#

Just with a lighter distro there's less shit running

#

But you could configure what you have yourself too I suppose, it just seems like more work

#

What I mean is disable unneeded running services and other processes

#

Play around with groups to limit cpu usage for other processes

#

Just throwing out some ideas

marble sentinel
#

Alright thanks @warped nimbus

#

Will test stopping some stuff see if it breaks anything ๐Ÿ˜…

#

Or just try to change priorities

haughty verge
#

@marble sentinel You could go to a barebones distro like yocto

boreal kestrel
#

Also consider reducing your program's nice

warped nimbus
#

Oh just noticed: I meant cgroups not groups

oak shell
#

I don't think cgroup hard-limiting processes is very useful on a desktop, adjusting niceness for less important things would be preferable imo

#

that allows them to still make use of all available resources but lets the scheduler give them less priority if the system is under load

main olive
#

ive seen really cool looking terminals

#

how do I make mine look like that?

boreal kestrel
#

define "really cool"

sage solar
#

not nromal

#

i guess

#

and you make yours look cool by using the config files at your disposal

#

for example you can configure bash with .bashrc

#

zsh with .zshrc etc

#

and if you want to go like Really fancy youd also have to stick to configs of your desktop or even window manager + your terminal emulator

warped nimbus
#

A common addition is powerline-shell

#

Also look up various terminal emulators

#

They each have their own theme configurations

deft patrol
#

The folk on unixporn may look impressive but their workspaces are just pretty

#

Focus on improving your workflow rather than looking cool

robust cave
#

to expand on that, focus on getting your workflow working the way you want before focusing on getting it to look the way you want

main olive
#

coming from windows

#

emojis look really weird on fedora

#

how do i set an emoji font per say

grand bane
#

so people

#

ive installed kali linux on my compute

#

and i wanted to install windows back

#

is there any option how i am able to do this

vestal turret
#

Do you still have the key?

oak shell
#

the problem right now is making a bootable windows usb

rigid vine
#

there are several solutions in this thread

vestal turret
#

The windows site will let you download iso's.

#

Which you can dd onto a thumb drive.

oak shell
#

I doubt the dd or disk image writer ways will work

#

maybe compiling woeusb from source

vestal turret
#

Why wouldn't it?

oak shell
#

because as far as I know, Windows needs special treatment and just flashing the iso as-is does not work

grand bane
#

i already tried to do dd

oak shell
#

and has also been tried ^

grand bane
#

and it didnt do anything

#

it just starts up the laptop with kali

sour mesa
#

Kali needs a new name, like "Ironhardrocksstonemetal"

#

to make it sound unfriendly

grand bane
#

the usb ive got now does at least anything

sour mesa
#

didn't do anything?

grand bane
#

it shows me a blue screen with an error about windows installation

sour mesa
#

uh?

#

if you dd the image and then set the boot order properly

#

it should not continue to boot Kali

grand bane
#

ill try another time

rigid vine
#

do you get any specific error, or does it just say "error about windows installation"?

sour mesa
#

how about you try right now?

#

from what you said your only computer runs an OS that is not meant to be used for your only computer

grand bane
#

but how to dd

#

i looked at the website

#

and am still not sure

sour mesa
#

dd pathtoISO pathtodisk

grand bane
#

maybe i did it the last time wrong

sour mesa
#

what did you do last time

rigid vine
#

if= and of= preferred

sour mesa
#

o yes

grand bane
#

i just copied some code from a website changed to my windows iso and thats it

#

and how bout the sync?

#

and the bs=4M

oak shell
#

that's fine

grand bane
#

my usb is inside the dev

#

sdb but also sdb1

#

which should i choose

vestal turret
#

sdb, that's the whole stick (Assuming that really is the usb, if not you'll lose data on something else) sdb1 is a partition on sdb

grand bane
#

oh and also sg1

#

what is sg1

rigid vine
#

make sure you're looking at the correct device. look closely at the total sizes

#

we have no idea

grand bane
#

no look

#

i put the usb in

#

and look carefully

#

and put out

#

there are 3 files poppin in

sour mesa
#

???

#

"poppin in"?

#

"put out"

#

"look carefully"

#

what does any of this mean

grand bane
#

okay

#

you know the dev file

#

there are the usb's displayed

#

if i put my stick into my computer

rigid vine
#

i'm just saying you should be sure which device is which, because one device is your laptop's internal HDD, one is the usb.
if you dd to the wrong device, you could be out a laptop

grand bane
#

i see

#

three files that pop into the file

sour mesa
#

out a laptop temporarily

#

could be saved by finding a device to use to get a bootable USB

rigid vine
#

maybe a local pc shop has a windows install usb

sour mesa
#

still don't know what "pop into" means

oak shell
#

lsblk lists all devices. Examine that output

sour mesa
#

@rigid vine or just a PC you could borrow lol

#

or maybe not

grand bane
#

sda 8:0 0 238.5G 0 disk
โ”œโ”€sda1 8:1 0 230.6G 0 part /
โ”œโ”€sda2 8:2 0 1K 0 part
โ””โ”€sda5 8:5 0 7.9G 0 part [SWAP]
sdb 8:16 1 14.6G 0 disk
โ””โ”€sdb1 8:17 1 14.5G 0 part /media/peter/MKDB

sour mesa
#

"hey can I borrow a PC and come back like tomorrow I promise I'll come back"

#

okay, so sdb is your USB

#

on sdb we see a 16GB drive

#

on sda we see 250GB and three partitions that look suspiciously like an EFI partition, swap space and a Linux install

#

wait, you have 8GB of swap?

#

..nevermind

grand bane
#

well i dont understand what you mean by swapping

sour mesa
#

it doesn't matter

#

but it doesn't matter

#

you're not going to be needing that

#

you should be able to

#

dd if=/path/to/windows/iso of=/dev/sdb

grand bane
#

alright thanks

#

dd /Downloads/Win10_1903_V1_Dutch_x64.iso of=/dev/sdb
dd: unrecognized operand โ€˜/Downloads/Win10_1903_V1_Dutch_x64.isoโ€™

sour mesa
#

you did not write what I wrote

rigid vine
#

if= and /Downloads probably doesn't exist

grand bane
#

ohh

#

woowww

#

sorry

sour mesa
#

mistakes like that with commands as powerful as dd can cost you your system, you really should be more careful with them

grand bane
#

dd: failed to open '/Downloads/Win10_1903_V1_Dutch_x64.iso': No such file or directory

sour mesa
#

yup downloads doesn't exist

#

it's in your home folder, not on root

grand bane
#

wait i did control c

#

to exit while he was creating the usb

#

can this harm my system

#

he renamed the usb

#

but the usb was empty

oak shell
#

no, it just means you have to start again from the beginning

grand bane
#

alright

oak shell
#

you can add status=progress to the dd command line

#

that will make it show some status output while it is running

grand bane
#

ill do that thanks

grand bane
#

ev/sdb
9407812+0 records in
9407812+0 records out
4816799744 bytes (4.8 GB, 4.5 GiB) copied, 1429.96 s, 3.4 MB/s

#

but the folder is still empty

sour mesa
#

what's "the folder"

#

it sounds as though it worked

#

start with USB

grand bane
#

yea its inside usb

#

but

#

it didnt do anything

#

i restarted the computer

#

it just runs kali

#

nothing happens

#

theres this option inside disks

#

where you can choose a partition for your usb

#

which should it be?

sour mesa
#

@grand bane are you setting the boot priority correctly

grand bane
#

i dont know how i should do that

#

this is the usb

sour mesa
#

boot and hold the key it tells you to

#

it's probably F2

grand bane
#

alright so boot and F2

#

and then what should happen?

sour mesa
#

oh, do you have a way of using Discord when the machine is off

grand bane
#

yes

sour mesa
#

k

grand bane
#

through my phone

sour mesa
#

so once you've done that there should be a "boot" menu or something similar

#

and then there'll be a list of things there

#

one should seem like it's a USB

#

maybe called a removable media

#

then you want to make sure it's at the top

grand bane
#

wait i made a video

#

which shows how my pc starts up

#

i am uploading it

#

so within a few minutes you can take a look

grand bane
#

wait

#

i have something

sour mesa
#

?

grand bane
#

i have an old windows xp laptop

#

dd didnt work

#

it doesnt recognize the usb

#

ive trouble transferring the video

#

becs its 120 mb

#

but can i do it with the windows xp laptop?

sour mesa
#

definitely

grand bane
#

what should i do

#

i will erase the usb

#

wait lets begin by beginning

#

would you please explain how to erase the usb

#

in kali

#

or in windows

#

xp

odd hollow
#

how to erase a flashdrive?

vestal turret
#

Fast or secure?

copper hatch
#

Do you guys know how to install python 3.7.3 on linux mint?

grand bane
#

apt get install python3 i guess

#

or maybe you can download a tar from their website

#

and extract inside your mint

stone pier
#

yea i think you probably have to compile it from source

#

perhaps you can get pyenv to do that for you though

oak shell
#

you should be able to use the deadsnakes PPA for Ubuntu, I guess

copper hatch
#

thank you for your response! apt-get oly has 3.7.1

#

@fist I did that, but if i wanted to remove it later on I won't be able to

oak shell
#

does that make so much of a difference? what would you need specifically from 3.7.3?

stone pier
#

you're not the first to call me fist lol

copper hatch
#

lmao

#

I noticed sorry mate

stone pier
#

haha all good

copper hatch
#

@oak shell ordered dictionaries