Terminal help
#1
Hi all!

I've been using Mobian on a Braveheart for a while now and I'm really impressed with the project so far.

My plan right now is to write some simple bash scripts for various purposes. I'm sure it's documented somewhere but I figured I ask here first. I would be very happy if some of you Linux experts out there could help me out.

How do I toggle the following functionalities (devices) on or off only using the Kings cross terminal:

1) Wifi?
2) Bluetooth?
3) Modem?
4) LTE?
#2
Not really my expertise so i may be ignorant in saying this, however it may be similar to enabling gps through terminal in UT. There's a post on that that goes through it line by line. Might be a similar process for the other tools, and Ubuntu is debian based.
#3
(10-22-2020, 02:51 PM)noob444 Wrote: Hi all!

I've been using Mobian on a Braveheart for a while now and I'm really impressed with the project so far.

My plan right now is to write some simple bash scripts for various purposes. I'm sure it's documented somewhere but I figured I ask here first. I would be very happy if some of you Linux experts out there could help me out.

How do I toggle the following functionalities (devices) on or off only using the Kings cross terminal:

1) Wifi?
2) Bluetooth?
3) Modem?
4) LTE?

Code:
sudo ip link set NetworkCardName down


to set device down (replacing NetworkCardName with name of your device)

Code:
sudo ip link set NetworkCardName up


to bring up.

The ip command is very powerful. You should take a look at the manual pages (man ip) to get a better idea of all of it's capabilities. 

Here is a good guide https://upload.wikimedia.org/wikipedia/c...ipting.pdf
- RTP

"In the beginner's mind there are many possibilities, in the expert's mind there are few." -Shunryu Suzuki


[ Pinephone Original | Pinetab v1 / v2 Enjoyer ]


Linux Device Privacy / Security Playlist



#4
@Cree. Thanks, I have been able to pull most of these things off in UBports. But the scripts I've already created don't seem to work out of the box in Mobian. Thank you also for bringing up GPS, because I simply forgot about it. It would also be great to have the ability to toggle the GPS on/off in the terminal.

@RTP. Thanks alot! I will definetely try your code and read up on the ip command. I really appeciate it.
#5
There's a fair bit of detail about the GPS in the mobian wiki. Adding upload of AGPS data will make it a lot more usable.
https://wiki.mobian-project.org/doku.php?id=location


Possibly Related Threads…
Thread Author Replies Views Last Post
  Reading SMS from the terminal? SocialNetworkingWasAMistake 6 4,298 10-19-2021, 10:01 AM
Last Post: ragreenburg
  after dist-upgrade, terminal is broken nelstomlinson 9 5,606 09-09-2021, 06:47 AM
Last Post: nelstomlinson
  How do you copy and paste into mobian terminal? Do you ssh instead? temp0rary 6 5,003 06-01-2021, 12:16 PM
Last Post: temp0rary
  Anyone know how to start a terminal at current dir with Nemo? rp3 6 5,075 01-19-2021, 10:04 AM
Last Post: KC9UDX
  Make 'terminal' on-screen keyboard the default 3x5co 0 1,778 12-27-2020, 05:11 PM
Last Post: 3x5co

Forum Jump:


Users browsing this thread: 1 Guest(s)