You are not logged in.

#5951 2017-06-08 10:30:26

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,534
Website

Re: The Official Hello Everyone Thread

Welcome pandatricks.  I know you didn't ask for feedback, but I'd like to offer at least one suggestion that should really help your scripting: there is (almost?) never any reason to combine grep and awk.  Generally I'd say awk can take care of both steps but in getting your WIFI variable I'm not even sure what awk is doing there: grep only outputs one word, and awk prints the first word of every line.  This can be replaced by just grep here - but also note your grep expression is far to specific - it will cut off the end of many wireless interface names.  The following would be better:

WIFI=$(ip link | grep -o 'wl[^:]*')

I've also replaced the backticks with $() but that's mostly just a style issue.

There are other cases of excess pipes.  The tail -> grep -> awk -> head could definitely be reduced.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#5952 2017-06-09 05:49:04

racbear
Member
Registered: 2017-06-09
Posts: 2

Re: The Official Hello Everyone Thread

Hi there,

Greetings from Jakarta.
I'm Centos 3 and Ubuntu Dapper Drake generation, and i'm stuck with 6.8 Centos and 14.04 Ubuntu for just ignoring SystemD smile
I like pacman since my childhood, and now i'm starting to use Arch as guest in my win7 vmware. I think i will use it as main host os in my old x220 when i found light and customizable DE for old hardware, later.

Offline

#5953 2017-06-09 09:57:09

Pandatricks
Member
Registered: 2017-06-08
Posts: 2

Re: The Official Hello Everyone Thread

Trilby wrote:

Welcome pandatricks.  I know you didn't ask for feedback, but I'd like to offer at least one suggestion that should really help your scripting: there is (almost?) never any reason to combine grep and awk.  Generally I'd say awk can take care of both steps but in getting your WIFI variable I'm not even sure what awk is doing there: grep only outputs one word, and awk prints the first word of every line.  This can be replaced by just grep here - but also note your grep expression is far to specific - it will cut off the end of many wireless interface names.  The following would be better:

WIFI=$(ip link | grep -o 'wl[^:]*')

I've also replaced the backticks with $() but that's mostly just a style issue.

There are other cases of excess pipes.  The tail -> grep -> awk -> head could definitely be reduced.

Thanks.  I'm definitely here to learn, so tips are good.

Also I realised my previous version was crap.  I should interrogate the system properties rather than script variables in the reporting lines at the end.  I tested the bejeezus out of it today at work and it's much better.

#!/usr/bin/bash
#Set up hexadecimal array.
declare -a hx=(0 1 2 3 4 5 6 7 8 9 a b c d e f)
#Set up array of MAC vendor strings. Use only those likely to be legitimate mobile devices in your country. http://standards-oui.ieee.org
declare -a vn=(
"48:ad:08" "2c:ab:00" "00:e0:fc" "80:38:bc" "64:a6:51" #Huawei
"00:cd:fe" "18:af:61" "cc:44:63" "6c:72:e7" "08:74:02" #Apple
"38:f2:3e" "38:25:6b" "30:0d:43" "60:7e:dd" "a4:51:6f" #Microsoft
"80:7a:bf" "90:e7:c4" "7c:61:93" "2c:8a:72" "98:0d:2e" #HTC
"4c:7f:62" "40:7a:80" "b0:5c:e5" "48:dc:fb" "6c:9b:02" #Nokia
"6c:0e:0d" "b4:52:7d" "e0:63:e5" "00:0e:07" "00:1d:28" #Sony
"30:96:fb" "f0:ee:10" "9c:d3:5b" "10:30:47" "38:d4:0b" #Samsung
)
#Extract wireless interface name from ip link. Or just hard code your interface name.
WIFI=$(ip link | grep -o 'wl[^:]*')
#A couple of new lines for easy reading.
echo -e '\n''\n'
#Show current hostname.
HN=$(hostname)
echo -e Your current hostname is: $HN
#Show wireless interface name.
echo -e Your wireless interface name is: $WIFI
#Get old MAC address.
MAC=$(cat /sys/class/net/$WIFI/address)
#Show old MAC address.
echo -e Your current wifi MAC address is: $MAC
#Assemble new MAC sequence.
MAC=${vn[$(($RANDOM%15))]}:${hx[$(($RANDOM%15))]}${hx[$(($RANDOM%15))]}:${hx[$(($RANDOM%15))]}${hx[$(($RANDOM%15))]}:${hx[$(($RANDOM%15))]}${hx[$(($RANDOM%15))]}
echo -e -n Attempting to disable wireless interface $WIFI...
if ! ip link set dev $WIFI down
       then
              echo -e "\e[91mFAILED.\e[39m"
              exit
       else
              echo -e "\e[32mSUCCEEDED.\e[39m"
       fi
echo -e -n Attempting to generate new hostname...
if ! HN=$(shuf -n1 /usr/share/dict/cracklib-small)
       then
              echo -e "\e[91mFAILED.\e[39m"
              exit
       else
              echo -e "\e[32mSUCCEEDED.\e[39m"
       fi
echo -e -n Attempting to set new hostname...
if ! hostnamectl set-hostname $HN
       then
              echo -e "\e[91mFAILED.\e[39m"
              exit
       else
              echo -e "\e[32mSUCCEEDED.\e[39m"
       fi
echo -e -n Attempting to change wireless interface $WIFI MAC address...
if ! ip link set dev $WIFI address $MAC
       then
              echo -e "\e[91mFAILED.\e[39m"
              exit
       else
              echo -e "\e[32mSUCCEEDED.\e[39m"
       fi
echo -e -n Attempting to enable wireless interface $WIFI...
if ! ip link set dev $WIFI up
       then
              echo -e "\e[91mFAILED.\e[39m"
              exit
       else
              echo -e "\e[32mSUCCEEDED.\e[39m"
       fi
echo -e Your new hostname is: $(hostname)
echo -e Your new MAC address for wireless interface $WIFI is: $(cat /sys/class/net/$WIFI/address).
#A couple of new lines for easy reading.
echo -e '\n''\n'

Offline

#5954 2017-06-09 16:32:27

Texbrew
Member
From: The Lone Star State
Registered: 2016-02-09
Posts: 580

Re: The Official Hello Everyone Thread

racbear wrote:

...i'm starting to use Arch as guest in my win7 vmware. I think i will use it as main host os in my old x220 when i found light and customizable DE for old hardware, later.

Welcome to the Arch Linux Forum. There are a few DE's suitable for older computers. Guessing that your X220 is a Thinkpad, I doubt you would have trouble running any DE. XFCE4 is pretty light weight (my opinion), and I think LXDE is even lighter. My personal favorite is OpenBox, but it does require you to "get your hands dirty" - set up configuration, menu entries, etc.

I hope you enjoy exploring the Arch Linux world.

tex

Offline

#5955 2017-06-09 17:36:44

maslam
Member
Registered: 2017-06-09
Posts: 1

Re: The Official Hello Everyone Thread

Salutations,

I start learning Linux since a couple of weeks, I tried all the fancy distributions, Ubuntu, mint, CentOS etc but I finally landed on arch on learn the depths of Linux. How all the things are working under the hood and arch is quite good at explaining it by making us doing ourselves.

Well I am still trying to install arch again and again to understand mount points, file system tables, network configuration etc.


Best,
aslam

Offline

#5956 2017-06-10 16:11:06

jaine
Member
Registered: 2017-06-10
Posts: 4

Re: The Official Hello Everyone Thread

hey been using Arch linux for years. Not really much of a communicator so havent joined the forums. decided what the hell.

Offline

#5957 2017-06-10 19:02:54

phoenix310
Member
Registered: 2017-06-10
Posts: 5

Re: The Official Hello Everyone Thread

Hey all! I'm new to Arch Linux and trying to get my feet wet with it. I've used pretty much mostly Debian based systems with a stint with Fedora and openSUSE (very short stint with openSUSE). In searching for a everyday distro to use, I keep hearing about Arch (and its derivatives) so I decided to give it a whirl. So far it's pretty nice. It's cool to have much more control of my system and the packages I install. I'm still trying to get my network shares to mount using my logon script. I'll search the forums for some answers and see what I'm doing wrong. I'm using the MATE desktop and I'm used to just plopping the script path at the end of the .profile file but it doesn't seem to work at all in the .bash_profile. All in all that's my only real issue so far. Other than that, I enjoying the package manager and everything else.

Offline

#5958 2017-06-11 03:44:40

CimpianAlin
Member
Registered: 2017-06-11
Posts: 1

Re: The Official Hello Everyone Thread

I just want to say, but she can say it better than me: Hello

Offline

#5959 2017-06-11 03:51:43

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: The Official Hello Everyone Thread

CimpianAlin wrote:

I just want to say, but she can say it better than me: Hello

Well then, welcome to the forums, Adele wink

Offline

#5960 2017-06-11 16:42:22

Gnew Stemdee
Member
Registered: 2017-06-11
Posts: 7

Re: The Official Hello Everyone Thread

Hello All,

New to Arch, around 9 years using Linux at home.
Looking forward to learning all I can from the great resources available here while using Arch.
Hope to be able to contribute in some meaningful way sometime down the road.

Offline

#5961 2017-06-12 09:04:52

0xreverser
Member
Registered: 2017-06-12
Posts: 3

Re: The Official Hello Everyone Thread

Hello everyone!
This community is making ArchLinux better, i have learnt a lot, thanks a lot.

Regards

edit: because i was immature

Last edited by 0xreverser (2019-05-31 08:50:55)

Offline

#5962 2017-06-12 10:59:35

Alad
Wiki Admin/IRC Op
From: Bagelstan
Registered: 2014-05-04
Posts: 2,412
Website

Re: The Official Hello Everyone Thread

@jasonwryan i don't thank you

With an attitude like that I doubt you'll fare well here.


Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby

Offline

#5963 2017-06-12 11:05:48

0xreverser
Member
Registered: 2017-06-12
Posts: 3

Re: The Official Hello Everyone Thread

Alad wrote:

@jasonwryan i don't thank you

With an attitude like that I doubt you'll fare well here.

Thank you Alad

edit: because Alad was right

Last edited by 0xreverser (2019-05-31 08:51:27)

Offline

#5964 2017-06-13 22:13:30

Texbrew
Member
From: The Lone Star State
Registered: 2016-02-09
Posts: 580

Re: The Official Hello Everyone Thread

Welcome, forum newcomers.

jasonwryan is an incredibly knowledgeable guy. I don't think I will ever attain his skill level. He also practices great economy of words. He doesn't waste them. One would do well to thicken one's skin, don't take every terse and direct statement as a personal attack, and to take jwr's advice. If he tells you to read the wiki, he usually provides a link to the specific page on the subject at hand. By doing that, he has greatly narrowed our search. We are expected to dig into the information on our own. This is truly the better way to learn.

Dig in, learn, and enjoy the wonderful world of Arch Linux!

tex

Offline

#5965 2017-06-14 09:59:04

ndttt
Member
Registered: 2017-03-19
Posts: 38

Re: The Official Hello Everyone Thread

Hi all.

I've always been interested in servers and whatnot, but since I was comfortable using Windows, 90% of my network is Windows based. It started when I got sick of carrying around an external harddrive and wanted to be able to stream my movies around the house. Converted my gaming PC to a file server and it worked wonderfully for 4 years... until a drive died. Luckily I had backups, but it gave me wake up call on backups... Windows kinda sucks at it. Since then, I've moved on from the old gaming PC and I now run ESXi to virtualize everything. Easier to backup everything and run raid for less downtime - it would really suck if I was in the middle of exams and something died... Mostly run Debian VM's now.

Well for my personal laptop, I've been using a 15 inch Macbook and it's been great, nothing to complain... except the size. It's heavy, bulky, and way too much power for school. I wanted to get a cheap, durable, light laptop, but I didn't have the money for a new Macbook. Definitely didn't want to go back to Windows.. and the cheapest thing avaliable was a chromebook. Yeah no. I still wanted a proper computer. I heard about old thinkpads running Linux and it sounded... affordable. I've tried uBuntu and Debian a few times on a desktop, but it just didn't feel right. Then I heard about Arch, a 'bleeding edge' distro with plenty of support (The wiki is amazing). Checked out a few setup screenshots and they looked amazing!

I eventually found an x220 for cheap and I quickly got Arch setup. It worked, but it wasn't perfect. By the time I finished setting it up, school got a bit intense so I let the install kinda get bloated and bad. Lots of random bugs everywhere. Now that I've finished exams, I finally got time to setup Arch the way I wanted and it's fantastic. Reading more about pacman sure did help me figure out the downgrading process, etc. Love the way it works.

Plans for whenever I have time is to get proper backup's going with rsync - I loved Timemachine on my macbook and while I know there's something similar, I like the idea of a full whole system backup more. I also want to figure out how to encrypt the whole partition and lastly get VM's running inside Arch so I don't have to dualboot into Windows if school has a program that's only for Windows.

Thank you,
N

Offline

#5966 2017-06-14 10:39:06

salafrance
Member
From: Aelfang's Barrow
Registered: 2013-04-17
Posts: 43

Re: The Official Hello Everyone Thread

racbear wrote:

I think i will use it as main host os in my old x220 when i found light and customizable DE for old hardware, later.

I have Arch and Gnome Gnome on my X220, and it runs perfectly, just for some perspective.

And, hi ^^

Offline

#5967 2017-06-14 18:50:55

kailashkatheth
Member
From: nepal
Registered: 2017-06-14
Posts: 18
Website

Re: The Official Hello Everyone Thread

hello after hours of effort finally installed  arch linux official with deepin as de

Offline

#5968 2017-06-14 21:07:23

eoinfirestorm
Member
From: The Deep North of California
Registered: 2017-06-14
Posts: 1

Re: The Official Hello Everyone Thread

My name is Jon and I have a problem. It started when a gnome told me about something called Ubuntu, and I thought, "Elementary, what a fun OS to play with". Until someone backtracked and went looking for something Minty fresh. After my journey, I've arrived at the arches of Linux and find myself haunted with possibilities of what I can configure. I joined this forum since as a distro, a strong community backing would make setting up and playing with arch more enjoyable. I'm not uncomfortable with the terminal but I keep realizing that there is more that I don't know about it an find myself consistently learning new things.

Jon


@eoinfirestorm

Offline

#5969 2017-06-14 23:50:11

enois
Member
From: Italy
Registered: 2017-06-14
Posts: 8

Re: The Official Hello Everyone Thread

Greetings from Italy!
I've been using Linux (mainly Ubuntu and derivates) for a while - say, a couple of year - as ‘casual user’, but since I like to know how things work, to use them better, I decided to try Arch Linux: it seems an opportunity to learn and have a better OS.

So... we'll meet again (and soon) in the Newbie Corner! smile

Offline

#5970 2017-06-15 10:40:30

Executor
Member
From: England
Registered: 2017-06-13
Posts: 20

Re: The Official Hello Everyone Thread

enois wrote:

Greetings from Italy!
I've been using Linux (mainly Ubuntu and derivates) for a while - say, a couple of year - as ‘casual user’, but since I like to know how things work, to use them better, I decided to try Arch Linux: it seems an opportunity to learn and have a better OS.

So... we'll meet again (and soon) in the Newbie Corner! smile

Welcome to the Arch Linux Forums - Enois.


i7 4790K 4.0GHz, ASUS B85-PRO GAMER, 8GB RAM, GTX 750 Ti, Arch x86_64

Offline

#5971 2017-06-18 09:10:07

TheSpiriTg9
Member
From: Zagreb, Croatia
Registered: 2017-06-18
Posts: 1
Website

Re: The Official Hello Everyone Thread

Hello,

I just created account, but I'm using Arch for quite some time now. I reinstalled it a lot of times (no special reason like it didn't work, was just playing with configuration) and last time I did was yesterday.
I'm running it on btrfs on luks, one partition for '/' and one for storage (mounted as '/home/storage'. home is on root partition but have Documents, Downloads, etc. linked to storage partition. '/' is on SSD and '/home/storage' is on HDD

I come from Croatia and currently live in Zagreb, I spent most of my life and childhood in Osijek though.
I currently work as junior developer and am 22 years old.

Would like to thank great Arch community that helped me solve my problems many times in past (by finding answer on [solved] forum threads and great wiki)

That would be all (maybe even too much :S) from me smile
Enjoy!

Offline

#5972 2017-06-18 22:50:31

Texbrew
Member
From: The Lone Star State
Registered: 2016-02-09
Posts: 580

Re: The Official Hello Everyone Thread

Welcome aboard, and "Howdy", fellow Archers. I think it's wonderful that the Arch community continues to grow, and is made up of people from all over the world.

tex

Offline

#5973 2017-06-21 07:02:22

3mmar3d
Member
From: Iraq
Registered: 2017-06-21
Posts: 2

Re: The Official Hello Everyone Thread

Hello to everyone
this is Ammar from Iraq
iam power engineer
am biggner and want to use this great disto as i checked the websites and youtubes

sorry if sometimes my English not well

thanks in advance

Offline

#5974 2017-06-21 13:28:13

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: The Official Hello Everyone Thread

Hi Ammar, welcome to forums. Please be sure to install Arch by reading our official wiki only: https://wiki.archlinux.org/index.php/Installation_guide

It might seem a little difficult at first, but it will help you in the longer run than following third party tutorials.

Offline

#5975 2017-06-21 14:30:14

archimboldo
Member
Registered: 2016-03-07
Posts: 232

Re: The Official Hello Everyone Thread

TheSpiriTg9 wrote:

Hello,

I just created account, but I'm using Arch for quite some time now. I reinstalled it a lot of times (no special reason like it didn't work, was just playing with configuration) and last time I did was yesterday.
I'm running it on btrfs on luks, one partition for '/' and one for storage (mounted as '/home/storage'. home is on root partition but have Documents, Downloads, etc. linked to storage partition. '/' is on SSD and '/home/storage' is on HDD

I come from Croatia and currently live in Zagreb, I spent most of my life and childhood in Osijek though.
I currently work as junior developer and am 22 years old.

Would like to thank great Arch community that helped me solve my problems many times in past (by finding answer on [solved] forum threads and great wiki)

That would be all (maybe even too much :S) from me smile
Enjoy!

Welcome - Dobrodošao! :-)


Rules for problems.
Everyone has problems. Animals have problems. And buildings. And cats, and trees.
Problems are your friends. Treat them well.

Offline

Board footer

Powered by FluxBB