Some handy command line aliases

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
tgwilt
Level 2
Level 2
Posts: 88
Joined: Fri Jun 08, 2018 2:26 am
Location: Florida, USA

Some handy command line aliases

Post by tgwilt » Tue Jul 10, 2018 2:36 pm

I prefer the command line over any gui to get things done. I have added a few shortcut keys called aliases that I've found pretty handy over the years. Thought I'd share them for users who like the command line, too.

Here is the content of a file called .bash_aliases located in my home directory.
alias cle='clear'
alias x='exit'
alias rb='sudo reboot'
alias ur='uname -r'
alias nrst='sudo /etc/init.d/network-manager restart'

If you create a file called .bash_aliases, and copy and paste these, they will be active in the next shell you launch.
I use all of them very frequently.

Tom

User avatar
AZgl1500
Level 11
Level 11
Posts: 3656
Joined: Thu Dec 31, 2015 3:20 am
Location: Oklahoma where the wind comes sweeping down the plains
Contact:

Re: Some handy command line aliases

Post by AZgl1500 » Tue Jul 10, 2018 3:47 pm

nice and handy....

thanks.

blockhead47
Level 2
Level 2
Posts: 86
Joined: Wed Jun 15, 2016 4:50 pm
Location: Chicago, IL, USA

Re: Some handy command line aliases

Post by blockhead47 » Wed Jul 11, 2018 10:10 am

A few of my favorites:

alias drives='lsblk -p -o Model,Name,Size,fstype,Label,UUID,Mountpoint -x name'
alias lsroot='find ~ -user root -exec ls -lad {} \;'
alias partitions='sudo parted -l && sudo blkid -o list'
alias specs='inxi -Fxz'

lsroot finds files owned by root in your home directory

tgwilt
Level 2
Level 2
Posts: 88
Joined: Fri Jun 08, 2018 2:26 am
Location: Florida, USA

Re: Some handy command line aliases

Post by tgwilt » Wed Jul 11, 2018 10:30 am

The alias specs='inxi -Fxz' is something I'm going to add right now. Thanks!

User avatar
AZgl1500
Level 11
Level 11
Posts: 3656
Joined: Thu Dec 31, 2015 3:20 am
Location: Oklahoma where the wind comes sweeping down the plains
Contact:

Re: Some handy command line aliases

Post by AZgl1500 » Wed Jul 11, 2018 11:31 am

blockhead47 wrote:
Wed Jul 11, 2018 10:10 am
A few of my favorites:

alias drives='lsblk -p -o Model,Name,Size,fstype,Label,UUID,Mountpoint -x name'
alias lsroot='find ~ -user root -exec ls -lad {} \;'
alias partitions='sudo parted -l && sudo blkid -o list'
alias specs='inxi -Fxz'

lsroot finds files owned by root in your home directory
Dag nabbit, my shortcut list just doubled in size..... now I have to put it on a Sticknote :lol: :lol:

thanks for that little list, I like it.

that lsroot got the screen busy "real fast now" :D :D

Post Reply

Return to “Newbie Questions”