iT邦幫忙

0

28 MOST FREQUENTLY USED BASIC LINUX COMMANDS WITH EXAMPLES

In this article we are going to discuss on some most frequently used basic Linux commands with examples. This article is mainly useful for beginners who just started to learn Linux or want to learn Linux. In this topic we have included all those basic Linux commands by which you can easily operate Linux operating system easily from terminal.

So let’s have a look at basic Linux commands with examples

  1. List Files & Directories using ls

ls basic Linux commands with examples

To list files and directories in Linux we can use ls command. Refer the command below.

elinuxbook@ubuntu:~$ ls
app Desktop Documents Downloads file.txt Music Pictures Public Templates Videos
List files & Directories with some important details like Permissions, Owner, Symlink & Hardlink details, Created Date, File & Directories name.

elinuxbook@ubuntu:~$ ls -l
total 36
drwxrwxr-x 3 elinuxbook elinuxbook 4096 Aug 20 2017 app
drwxr-xr-x 2 elinuxbook elinuxbook 4096 Aug 20 2017 Desktop
drwxr-xr-x 2 elinuxbook elinuxbook 4096 Aug 20 2017 Documents
drwxr-xr-x 2 elinuxbook elinuxbook 4096 Aug 20 2017 Downloads
-rw-rwxrwx 1 elinuxbook elinuxbook 0 Feb 20 09:40 file.txt
drwxr-xr-x 2 elinuxbook elinuxbook 4096 Aug 20 2017 Music
drwxr-xr-x 2 elinuxbook elinuxbook 4096 Aug 20 2017 Pictures
List Hidden files & directories.

elinuxbook@ubuntu:~$ ls -a
. .bash_history .cache Desktop Downloads .gnupg .lesshst Music .profile .sudo_as_admin_successful .Xauthority
.. .bash_logout .compiz .dmrc file.txt .HipChat .local Pictures Public Templates .xsession-errors
app .bashrc .config Documents .gconf .ICEauthority .mozilla .pki .QtWebEngineProcess Videos .xsession-er
List files & directories with it’s Inode number.

elinuxbook@ubuntu:~$ ls -li
total 36
284379 drwxrwxr-x 3 elinuxbook elinuxbook 4096 Aug 20 2017 app
278746 drwxr-xr-x 2 elinuxbook elinuxbook 4096 Aug 20 2017 Desktop
278760 drwxr-xr-x 2 elinuxbook elinuxbook 4096 Aug 20 2017 Documents
278757 drwxr-xr-x 2 elinuxbook elinuxbook 4096 Aug 20 2017 Downloads
134040 -rw-rwxrwx 1 elinuxbook elinuxbook 0 Feb 20 09:40 file.txt
278761 drwxr-xr-x 2 elinuxbook elinuxbook 4096 Aug 20 2017 Music
278762 drwxr-xr-x 2 elinuxbook elinuxbook 4096 Aug 20 2017 Pictures

Basic Linux commands with examples to Manage Files & Directories

  1. Create a Directory in Linux
    Create a new directory in Linux using mkdir command.

elinuxbook@ubuntu:~$ mkdir data
3. Delete a Directory
Delete a directory using rmdir command.

elinuxbook@ubuntu:~$ rmdir data
4. Remove/Delete a file
Delete a file using rm command.

elinuxbook@ubuntu:~$ rm file.txt
To delete a directory with content we have to use rm command with argument -rf to delete it forcefully.

elinuxbook@ubuntu:~$ rm -rf data

Basic Linux commands with examples to Manage Users

  1. Create a New user in Linux
    To create a new user in Linux you can use useradd command. Refer the command below.

Read Complete Story
http://www.elinuxbook.com/28-most-frequently-used-basic-linux-commands-with-examples/


圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言