MakeTechEasier
  • Home
  •  
  • About
  •  
  • Archives
  •  
  • Jobs
  •  
  • Advertise
  •  
  • Contact Us
  • Windows
  • Linux
  • Mac
  • Internet
  • WordPress
  • iPhone
  • Android
  • All Categories
    • Android RSS
    • Firefox RSS
    • Gaming RSS
    • Google RSS
    • google chrome RSS
    • Internet RSS
    • iPhone/iPod Touch RSS
    • Linux RSS
    • Mac RSS
    • Mobile RSS
    • OpenOffice RSS
    • PC Hardware RSS
    • Review RSS
    • Roundup RSS
    • Windows RSS
    • Windows Mobile RSS
    • WordPress RSS
    • WordPress Plugins RSS
  • rss icon
  • email icon
  • facebook icon
  • twitter icon

Basic Bash Command For New Linux Users

Posted by: Damien on January 22nd, 2008
  • View Comments
  • Share

One of the challenges that new Linux users face is the using of bash command on the terminal. Even though some Linux distro (such as Ubuntu Gutsy) has improved the user interface a great extent and reduced the need to execute applications via command line, there will still be cases where using the command line terminal is required.

As a Linux newbie, there are some commands that you may want to acquaint with.

apt-get – Retrieve a Debian package from the Net. It is often used together with install and autoremove. For example:

sudo apt-get install vlc

retrieve the vlc package and install it on your system.

sudo apt-get autoremove vlc

will uninstall your vlc application and all dependencies package.

cd – change the current directory.

cd foldername

change the current directory to foldername

clear – clear the terminal screen.

chmod – change the permission of a file or folder.

sudo chmod 777 yourfile

allow everyone to read/write/execute yourfile

cp – copy a file/folder from one destination to another destination

cp yourfile /home /home/temp

copys yourfile from home to temp folder

mv – move a file/folder from one destination to another destination

mv yourfile /home /home/temp

move yourfile from home to temp folder

mount – mount an external device

sudo mount /media/sda1

chown – change the file owner and group

sudo chown root /u

change the owner of /u to root

tar – Untar (or uncompress) or tar (or compress) a file with the .tar extension

tar -xf compress.tar

dir – list the folders in the current directory.

eject – eject disc from optical device

grep – Search file(s) for lines that match a given pattern.

grep -i ‘hello world’ menu.h

look for the statement with ‘hello world’ in the file menu.h

gzip – compress or uncompress a file in .gz format

To uncompress: gzip myfile.txt.gz

To compress: gzip myfile.txt

fsck – check the consistency of file system and repair it

make – recompile a group of program, or source code

mkdir – create new directory/folder

mkdir temp

passwd – modify a user password

wget – retrieve web pages or file via HTTP, HTTPS, FTP

wget -r ‘http://abc.com/yourfile.pdf’

retrieve yourfile.pdf from the web url

rm – remove a file from a folder.

rm filename

rmdir – remove a folder

rmdir /temp

shutdown – shutdown or restart linux

useradd – add a user account

sudo useradd –gid prison criminal

adds the user criminal to the group prison

usermod – modify a user account

users – list the current users

If there is anything that you are unsure of, you can always append --help to the end of the command to show usage instruction.


Damien Oh is the owner and chief editor of Make Tech Easier

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 4.00 out of 5)
Loading ... Loading ...

Share and Enjoy!

  • StumbleUpon It!
  • reddit

Related Posts

  • Create a Private Encrypted Folder On Ubuntu Hardy With eCryptfs
  • How to Compress and Split Files in Ubuntu
  • How to Install Software from a Tarball in Linux
  • How to Enable Flash Support in Google Chrome in Ubuntu
  • Transform Kubuntu Jaunty to Windows 7 In 3 Simple Steps

Popular Posts

  • Turn Your Ubuntu Hardy to Mac OSX Leopard 502 comment(s)
  • Turn Your Ubuntu Intrepid Into Mac OSX Leopard 316 comment(s)
  • Download EASEUS Partition Master For Free – 24 Hours Only 178 comment(s)
  • How To Boot And Install Windows 7 From USB Flash Drive 137 comment(s)
  • 28 Coolest Firefox About:Config Tricks 126 comment(s)

Enjoyed the article? Subscribe to Make Tech Easier today to get your daily updates of technology tutorials, tips and tricks.

Enter your email:

  • Andyvan
    This doesn't really seem to be a bash tutorial, more like a command line tutorial. I'm pretty sure the same commands you've listed here would work in ksh, csh, etc.

    Now a bash tutorial that listed how to do if, loops, etc. I would find useful, but then again, hardly fare for a newbie.
blog comments powered by Disqus

Our Writers

  • Damien Oh - Chief Editor
  • Joshua Price
  • Shevonne Polastre (FreeAgentWriter)
  • Tavis J. Hampton (Lantern Torch)
  • Trevor Dobrygoski
  • Soumen Halder (Ampercent)
  • Sharninder Khera (Geeky Ninja)
  • Tanmay Ahmed (Tech-Tips-Geek)
  • Write for us

Latest Posts

  • How To Pin Any Files/Folders To Windows 7 Taskbar
  • Manage Your RSS Feed In Mac With NetNewsWire
  • How to Migrate From Blogger.com to Self-Hosted WordPress
  • Google Reader Play – The New Web Discovery Portal
  • How to Use Dropbox in a Non-Gnome Environment
Make Tech Easier on Facebook
Jobs by SimplyHired
Job Widgets

Copyright

All the articles (including the text, images and tutorials) are properties of MakeTechEasier.

You cannot copy whole tutorials, either in English or translate to another language without our permission.

Write for us

Writing a tutorial or article for MakeTechEasier is a great way to get exposure and give back to the community.

Read More Details

Suggestions

We need your help to help us serve you better! This is YOUR site, so if you have suggestions/feedbacks on how we can improve it for you, please let us know! We do our best to make this place better!

Make a Suggestion

Navigation

  • Home
  • About Us
  • Advertise
  • Jobs
  • Archives
  • Contact Us

Copyright © 2007-2010 Make Tech Easier | All Right Reserved.