Linux / Ubuntu

Linux Command Line

“GUI makes easy tasks easier But Command line makes difficult tasks possible “.

Command line which is more powerful,more faster and more flexible than any GUI Programs. Especially in working with Linux command line is very useful. This article make you familiar with some basic Linux commands.

File Commands
File Commands deals with files and folder manipulations.

ls directory listing
ls -al formatted listing with hidden files
cd dir change directory to dir
cd change to home
pwd show current directory
mkdir dir create a directory dir
rm file delete file
rm -r dir delete directory dir
rm -f file force remove file
rm -rf dir force remove directory dir (use this command with extreame caution. no prompt ,cannot undone if removed)
cp file1 file2 copy file1 to file2
cp -r dir1 dir2 copy dir1 to dir2; create dir2 if it doesn’t exist
mv file1 file2 rename or move file1 to file2 if file2 is an existing directory, moves file1 into directory 
file2
ln -s file link create symbolic link link to file
touch file create or update file
cat > file places standard input into file
more file output the contents of file
head file output the first 10 lines of file
tail file output the last 10 lines of file
tail -f file output the contents of file as it grows, starting with the last 10 lines

System Commands

date show the current date and time
cal show this month’s calendar
uptime show current uptime
w display who is online
whoami who you are logged in as
finger user display information about user
uname -a show kernel information
cat /proc/cpuinfo cpu information
cat /proc/meminfo memory information
man command show the manual for command
df show disk usage
du show directory space usage
free show memory and swap usage
whereis app show possible locations of app
which app show which app will be run by default
Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

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