You are not logged in.

#1 2025-01-08 03:31:12

Fernando M. Muniz
Member
Registered: 2024-06-27
Posts: 31

Multiple commands in a single line doesn't work [SOLVED]

To activate Wi-Fi in order to run archinstall, the user has to run a couple of commands one after the other:

iwctl
station wlan0 connect WIFI_NAME
WIFI_PASSWORD
exit
archinstall

I've noticed that unlike terminals, I can't run all of them at once:
iwctl ; station wlan0 connect WIFI_NAME ; WIFI_PASSWORD ; exit ; archinstall

Is the fact that this doesn't work intentional? If so, what is the reason for it?

Last edited by Fernando M. Muniz (2025-01-08 20:36:43)

Offline

#2 2025-01-08 06:52:09

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,649
Website

Re: Multiple commands in a single line doesn't work [SOLVED]

The iwctl man page shows how to use the command in the EXAMPLES section.


Para todos todo, para nosotros nada

Offline

#3 2025-01-08 07:03:02

Fernando M. Muniz
Member
Registered: 2024-06-27
Posts: 31

Re: Multiple commands in a single line doesn't work [SOLVED]

So there I can see the explanation to why it doesn't do that?

Offline

#4 2025-01-08 07:12:10

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,649
Website

Re: Multiple commands in a single line doesn't work [SOLVED]

Running `iwctl` with no arguments enters interactive mode, which will not exit until you pass `exit` at the command line. Until interactive mode is exited the rest of the commands in the line will not be run. This should be obvious.


Para todos todo, para nosotros nada

Offline

#5 2025-01-08 07:53:39

Fernando M. Muniz
Member
Registered: 2024-06-27
Posts: 31

Re: Multiple commands in a single line doesn't work [SOLVED]

It's always obvious when you know and not obvious when you don't. big_smile

Offline

#6 2025-01-08 09:23:44

Awebb
Member
Registered: 2010-05-06
Posts: 6,664

Re: Multiple commands in a single line doesn't work [SOLVED]

There is console output that might tell you something. You haven't mentioned any of the error messages. You just thought "it doesn't work", but that doesn't mean anything. What does "it doesn't work" mean? It does work. It does what it is supposed to, throw an error message. It doesn't do what you wanted. Pay attention to the error messages, they tell you what happens. Ponder on those and things will become very obvious to you very quickly.

Offline

#7 2025-01-08 09:52:32

Fernando M. Muniz
Member
Registered: 2024-06-27
Posts: 31

Re: Multiple commands in a single line doesn't work [SOLVED]

If I asked, then it wasn't obvious to me. What difference does obviosity makes here anyway?

Offline

#8 2025-01-08 09:59:23

Awebb
Member
Registered: 2010-05-06
Posts: 6,664

Re: Multiple commands in a single line doesn't work [SOLVED]

It's to get you to read the actual output and don't take intellectual shortcuts in the future.

Offline

#9 2025-01-08 10:13:32

Fernando M. Muniz
Member
Registered: 2024-06-27
Posts: 31

Re: Multiple commands in a single line doesn't work [SOLVED]

Unless users are obligated to reply to all posts, it's not happening. But on the good side; I rarely enter this forum.

Offline

#10 2025-01-08 10:27:40

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,646

Re: Multiple commands in a single line doesn't work [SOLVED]

long story short if you want scripted use you just run the commands directly, i.e. the literal example from the manpage HoaS urged you to read:

iwctl --passphrase=PASSPHRASE station DEVICE connect SSID

People don't tell you to read man pages or error messages to annoy you, they want to give pointers as to how you could solve questions like these yourself in the future.

Offline

#11 2025-01-08 12:09:23

Fernando M. Muniz
Member
Registered: 2024-06-27
Posts: 31

Re: Multiple commands in a single line doesn't work [SOLVED]

Thanks. It won't be as useful as I thought because my keyboard doesn't match the US default, which would then require more commands.

Offline

#12 2025-01-08 14:02:08

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,646

Re: Multiple commands in a single line doesn't work [SOLVED]

? What does that have to do with the original question? That you'd have to do more prep work before invoking archinstall anyway aside from just invoking iwctl?

In any case, if you consider the original question [SOLVED] please mark it as such by editing the title in your first post.

Offline

Board footer

Powered by FluxBB