WiFiホットスポットのデバイスを変更する

WiFiホットスポットのデバイスを変更する

WiFi アダプターを 2 つインストールしていますが、最初のアダプターではなく 2 番目のアダプターをモバイル ホットスポットに使用したいです。どうすればいいですか? nm-connection-editor を使用してデバイスを変更しようとしましたが、モバイル ホットスポットをオンにすると、最初のデバイスとの別の接続が作成されます。

答え1

注: 私のラップトップには 2 つの Wi-Fi カード/アダプターが搭載されていないため、テストされていません。

コマンドを実行してWi-Fiカード/アダプタの名前を取得しlshw、必要な値を探します。自分のケースのWi-Fiカード1と2を特定し、論理名を書き留めます。

lshw私のシステム内のコンテンツの一部

*-network
                description: Wireless interface
                product: Wireless 3165
                vendor: Intel Corporation
                physical id: 0
                bus info: pci@0000:02:00.0
                logical name: wlp2s0

ここでは、例えば2番目のWifiカード/アダプタの論理名はwlp2s0、この接続を次のように使用したいとします。wifi-hotspot

以下のコマンドで Wi-Fi ホットスポット接続を作成します。

nmcli device wifi hotspot ifname wlp2s0 con-name PARROT password 1234abcd

wlp2s0Wi-Fiカードの論理名を変更し
PARROT任意の接続名に変更し、任意のパスワードに
変更します1234abcd(最低8文字)。

このWifiホットスポットをオン/オフにするには、以下のコマンドを使用します。PARROT接続名を変更してください。

nmcli connection up PARROT
nmcli connection down PARROT

からman nmcli

wifi hotspot [ifname ifname] [con-name name] [ssid SSID] [band {a | bg}] [channel channel]
   [password password]
       Create a Wi-Fi hotspot. The command creates a hotspot connection profile according to
       Wi-Fi device capabilities and activates it on the device. The hotspot is secured with
       WPA if device/driver supports that, otherwise WEP is used. Use connection down or
       device disconnect to stop the hotspot.

       Parameters of the hotspot can be influenced by the optional parameters:

       ifname
           what Wi-Fi device is used.

       con-name
           name of the created hotspot connection profile.

       ssid
           SSID of the hotspot.

       band
           Wi-Fi band to use.

       channel
           Wi-Fi channel to use.

       password
           password to use for the created hotspot. If not provided, nmcli will generate a
           password. The password is either WPA pre-shared key or WEP key.

関連情報