Some Common Linux Commands

Linux has a well-developed graphical user interface – in fact it has several GUIs, the most popular of which are Gnome (on which Ubuntu is based) and KDE (Kubuntu‘s desktop).  But Linux also has a powerful command-line interface – also known as the console or terminal – and a great many commands to use in the CLI.

Here’s a little “cheat sheet” of common, basic Linux commands – just to get you started – you’d be wise to study this subject further if you’re serious about administering a Linux box.

Moving around in the file system
Command Action
pwd “Print working directory” – show what dir you’re in.
ls List the contents of a dir.
ls -l List the contents of a dir and show additional info of the files.
ls -a List all files, including hidden files.
cd Change directory.
cd .. Go to the parent directory.
Examining files
Command Action
file Determine the type of a file.
cat Concatenate a file.
less View text files and paginate them if needed.
Manipulating files and directories
Command Action
cp Copy a file.
cp -i Copy a file and ask before overwriting.
cp -r Copy a directory with its contents.
mv Move or rename a file.
mv -i Move or rename a file and ask before overwriting.
rm Remove a file.
rm -r Remove a directory with its contents.
rm -i Ask before removing a file. Good to use with the -r option.
mkdir Make a directory.
rmdir Remove an empty directory.

2 Responses to Some Common Linux Commands

  1. […] – bookmarked by 1 members originally found by hikairi on 2008-09-11 Some Common Linux Commands https://ihatehate.wordpress.com/?p=188 – bookmarked by 4 members originally found by ippe on […]

  2. set up your own minecraft sever today…

    […]Some Common Linux Commands « I HATE HATE!!![…]…

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: