linux commands for beginners


If you are new to Linux, you will need to enter commands for Linux users. In this article, you will learn some basic Linux commands that will definitely help you navigate Linux as a beginner.

Linux command file permissions

/* chmod octal file*/
4 - read (r)
2 - write (w)
1 - execute (x)

order:   owner/group/world
command example:
chmod 777 <filename>  // rwx for everyone
chmod 755 <filename>  rw for owner , rx for group/world

Linux command file manager

ls  - listing directory
ls -al   - list everything including hidden files
cd dir  -  navigate from one directory to another
pwd  - resent working directory
mkdir directoy_name  - create directory <directory_name>
rm file  -   delete file
rm -r dir   -  delete directory recursively
rm -f  file   - forcefully delete file
rm -rf dir   - forcefully delete directory and all content in it.
cp file1  file2   - copy file1 to file2
mv file1 files2   - rename file1 to files2
ln -s   file link  - create symbolic link 'link' to file
touch file  -  create or update a file
cat > file  -  place standard input  into file
more file  -  output the content of a file
less file  -  output the content of a file
head file - output first 10 lines of a file
tail file  -  output the last 10 content of a file.
tail -f  -  output the content of a file as it grows

Linux command ssh

ssh user @host  -  connect to host as a user
ssh -p port user@host  - connect using port p
ssh -D file user@host  - connect and use bind port

Linux install command

make install
sudo apt install   ./name.deb   - install .deb file
sudo dpkg -i  ./path_to_file   

Linux command networking

/ping host  - ping host 'host'
whois domain   - get whois for domain
dig domain  -   get DNS for domain
dig -x host   -  reverse lookup host
wget  file   - download file
wget -c   -   continue stpped download
wget -r url   -   recursively download file from url

Linux command system info

date  - show current date/time
cal  - show this month 's calendar
uptime   - show uptime
whoami     - who you are logged in as
uname   -a  -   show kernel config   
cat /proc/cpuinfo    -  cpu info
cat /proc/meminfo    -  memory info
man [command]   - show manual for command
df    - show disk usage
du   -  show directory space usage
du -sh
free -   show memory and swap usage

Linux command search

grep pattern files  -   search for pattern in files
grep -r pattern dir   -   search recursively for pattern in directory
[command]  | grep pattern   -   search for pattern in the output of a given command
locate file   -   find all instances of a file

Linux command process

ps   -  display currently active process
ps aux    -  processeswith more info
kill pid   -   kill process with given 'pid'
killall  [process name]    -  kill all process givien name  
bg    -   lists stopped/backgroud process jobs, resu,estopped job in the backgroud
fg   -   bring most recent job to foreground
fg  [my_job]  -   bring  ny_job and run on foreground

Linux command compress file

tar cf file.tar   files    -     compress filesto .tar file  
tar xf    -    untar into current directory
tar tf  file.tar   -   show contents of archive 

If you will like to have a handy pdf document for Linux commands, you can download them below:

download link 1

download link 2

A command line is a powerful tool. The client-server system can be easily configured on a Linux system. It provides a variety of command-line tools such as ssh, IP, email, and telnet for connecting to other systems and servers. Tasks such as network backups are much faster than other tasks. There are hundreds, if not thousands, of command-line tools. In addition, you can connect them as building blocks to perform more tasks. You can write a short script to do exactly what you need.

You will Also Understand what a GUI program does on the backend. you’ll find that it’s much more convenient and faster to launch a terminal and press a few keys to get the desired result than to perform a menu or a series of unexpected clicks.





One thought on “linux commands for beginners

Leave a Reply

Your email address will not be published. Required fields are marked *