Skip to content
Jassweb
  • Home
  • Company
    • About Us
    • Portfolio
    • Blog
    • Career 
  • Services
    • SEO
    • Digital Marketing
    • Web Design & Development
    • E-commerce Solutions
    • Fix Broken Website
    • Website Maintenance
    • Web Hosting & Manage Server
    • Enterprise Automation Solutions
    • Full-Stack SaaS Development
    • Coolify Automation Plugin
  • Shop
  • Tools
  • My Account
    • Cart
    • Checkout
    • My Bookings
      • Appointment canceled
      • Appointment reschedule
  • Contact Us

last Linux Commands – Overview with Examples and FAQs

March 10, 2023March 10, 2023 by Jass Web

Introduction

The Linux command ‘last’ is a powerful tool used to view information about the last logged in users on a Linux system. It can be used to view the login history of a user, the last time a user logged in, and the duration of the user’s session. It can also be used to view the last reboot of the system, and the last shutdown of the system. This command is useful for system administrators to monitor user activity on the system.

Examples

shutdown

The shutdown command is used to shut down or reboot a Linux system. It can be used to shut down the system immediately or at a specific time.

Syntax: shutdown [OPTION] [TIME] [MESSAGE]

Options:
-h: Shut down the system
-r: Reboot the system
-c: Cancel a pending shutdown
-k: Don’t really shut down, just send the warning message

Examples:

shutdown -h now: Shut down the system immediately
shutdown -r +5 “System update in progress”: Reboot the system in 5 minutes with the message “System update in progress”
[ad_1]

[ad_2]

The Last Linux Command

The last Linux command is a useful tool for displaying the last lines of a file or output from a command. It is commonly used to view the last few lines of a log file, to see recent system activity, or to view the output of a command. The last command can be used to view the last few logins of a user, the last few system reboots, or the last few commands that were executed.

The syntax for the last command is as follows:

last [options] [username]

The options can be used to specify the number of lines to display, the time period to display, or the type of output to display. The username option can be used to display the last logins of a specific user.

For example, to view the last 10 logins of the user “john”, the command would be:

last -10 john

The output of the command would be a list of the last 10 logins of the user “john”.

The last command is a useful tool for viewing recent system activity or the output of a command. It can be used to view the last few logins of a user, the last few system reboots, or the last few commands that were executed.

Categories Linux Commands Tags adduser or addgroup, agetty, alias, anacron, apropos, apt, apt-get, aptitude, arch, arp, at, atq, atrm, awk, basename, batch, bc, bg, bzip, cal, cat, chgrp, chmod, chown, cksum, clear, cmp, comm, cp, date, dd, df, diff, dir, dmidecode, du, echo, eject, env, exit, expr, factor, find, free, grep, groups, gunzip, gzip, head, history, hostname, hostnamectl, hwclock, hwinfo, id, ifconfig, ionice, iostat, ip, iptables, iw, iwlist, kill, killall, kmod, last, Linux, ln, locate, login, ls, lscpu, lshw, lsof, lsusb, man, mdsum, mkdir, more, mv, nano, nc/netcat, netstat, nice, nmap, nproc, openssl, passwd, pidof, ping, ps, pstree, pwd, rdiff-backup, reboot, rename, rm, rmdir, scp, shutdown, sleep, sort, split, ssh, stat, su, sudo, sum, tac, tail, talk, tar, tee, time, top, touch, tr, tree, uname, uniq, uptime, users, vim or vi, w, wall, watch, wc, wget, whatis, whereis, which, who, xargs, yes, youtube-dl, zcmpor zdiff, zip, zz
Laravel Module Example – Tuts Make
What Is a Database Server & What Is It Used For?
© 2026 Jassweb • Built with GeneratePress